date

Dates in iPhone Settings Bundle

I'm working on a very simple iPhone app, that in the end will have maybe 3 or 4 settings. Ideally I'd like to use the Settings app provided for free in the SDK. One of the settings I'd like the user to be able to enter is their date of birth, however there doesn't seem to be a way to prompt the user for a date in the Settings app. Asi...

How to minimize the load in queries that need grouping with different invervals?

I'm looking for a best practice advice how to speed up queries and at the same time to minimize the overhead needed to invoke date/mktime functions. To trivialize the problem I'm dealing with the following table layout: CREATE TABLE my_table( id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, important_data INTEGER, date INTEGER);...

what is the role of the plus sign(+) in the following function which is excerpt from jquery source code

function now(){ return +new Date; } questions : what does the plus sign mean? when can you create a new object with a constructor function but without the following parentheses, such as new Date but not new Date() great thanks! ...

[mysql&php], what is the first day of a week, Monday or Sunday?

What is the first day of the week in mysql, Monday or Sunday?? I want to do this: (i am using php btw) Get today date (no problem) Display information of this week (stuck here) Previous and next week button, to display previous and next week data (cant do anything here) I am kinda of stuck while playing with the "date" thing. Can an...

How to display weekly(Mon to Sun) data in php and mysql??

In php i can get today date/day by using : $today = date('D, Y-m-d'); If today is wednesday 8 july, i want to display data from 6 - 11 July (9, 10 and 11 will be blank). How do I do that? Now my system is like, today is 8 July, i will display 2 - 8 july, but start on wednesday. Not very like this way. I prefer, start on Monday to sunda...

Javascript Date.Parse blows up on Russian Dates

Hello, We have a web application that gets its data from a certain database. The product writing to that database has been localized to RUSSIAN, thus its data, in particular the dates had been localized too. We encountered a problem where our DATES would not show on our application. We traced the problem to an invalid Date.parse() java...

How can I obtain the displayed value instead of actual value in Excel?

I have a cell containing a date ex. "05/11/09" It is currently displayed as "11-MAY-09". How do I copy-paste or use VBA to get the string "11-MAY-09" into the cell next to it ( NOT "05/11/09")? I can't figure it out other than piecing out the date pieces by itself. ...

Is it possible to set start of week for T-SQL DATEDIFF function?

I use DATEDIFF function to filter records added this week only: DATEDIFF(week, DateCreated, GETDATE()) = 0 and I noticed what it's assumed what week starts on Sunday. But in my case I would prefer to set start of week on Monday. Is it possible somehow in T-SQL? Thanks! Update: Below is an example showing what DATEDIFF doesn't che...

A "smart" (forgiving) date parser?

I have to migrate a very large dataset from one system to another. One of the "source" column contains a date but is really a string with no constraint, while the destination system mandates a date in the format yyyy-mm-dd. Many, but not all, of the source dates are formatted as yyyymmdd. So to coerce them to the expected format, I do (...

Magento Email Template Help

I need to format the date in an email template. The date gets included in the plain .html email as follows. Dispatch Date: {{var order.getShippingDate()}} Is there any way I can format this date? I've tried just using the standard php date() function to format it to no avail. ...

PHP Date function output in Italian

Hiya, Trying to output italian dates with date: <?php setlocale(LC_ALL, 'it_IT'); echo date("D d M Y", $row['eventtime']); ?> But it's still coming out in English, any ideas of what else i can do or what's wrong? it has to be script specific and not server wide... Thanks Shadi ...

How do I calculate someone's age in Java?

I want to return an age in years as an int in a Java method. What I have now is the following where getBirthDate() returns a Date object (with the birth date ;-)): public int getAge() { long ageInMillis = new Date().getTime() - getBirthDate().getTime(); Date age = new Date(ageInMillis); return age.getYear(); } But since getYear()...

How do I get the current year using SQL on Oracle?

I need to add the current year as a variable in an SQL statement, how can I retrieve the current year using SQL? i.e. BETWEEN TO_DATE('01/01/**currentYear** 00:00:00', 'DD/MM/YYYY HH24:MI:SS') AND TO_DATE('31/12/**currentYear** 23:59:59', 'DD/MM/YYYY HH24:MI:SS') ...

MySQL query to get non-data for unassigned dates

I have a table with weekly data that looks like: userID Site date ------ ------ ------ Smith Ferris Wheel 2009-07-13 Jones Outerspaceland 2009-07-13 LChar Ferris Wheel 2009-07-14 Smith Underworld 2009-07-16 Jones Fish Bowl 2009-07-17 Munson Go-Go Tech ...

Best jQuery Date Plugin for Dates of Extreme Difference (1000+ BC - Today)

I'm working on a project right now that requires great flexibility on the date-selector. Users may insert dates several thousands of years ago, as well as dates all the way up to today. Typical date-selectors are great for selecting dates within a few years from eachother, but not too well when it comes to selecting dates of vast differe...

Need only Date from DateTime

Hi I have a variable of DateTime type in SQL. Just need to have Date part of it. please Help? ...

Is there ever a good reason to store time not in UTC?

I am wondering if there are any good reasons to ever store time information in anything other that UTC (GMT)? I believe that this is a solid rule for all software engineering. The conversion to local time is merely a translation that happens at the UI layer for display purposes. I have also seen cases where the translatation is needed in...

How do you create a UTC time in C for a specific day, month and year ?

How do I create a UTC time in C for the following date: 1st July 2038 using standard ANSI C function calls (given that the tm_year element of the tm structure cannot be greater than 137) ? ...

How to set the Eclipse date variable format?

How can I set the format for the ${date} variable which can be used in Eclipse templates? ...

How to reformat and sort dates stored in nvarchar

I am trying to display Month and YY part of the date column such that it should appear as Original Format Apr 12 2009; Feb 20 2009; Dec 24 2008; May 18 2009; Jan 8 2009; Dec 6 2008; Apr 19 2009; Jan 4 2009; May 13 2009; Jan 5 2009 From these dates the day part should be ripped off such that it appears as "Apr 09" ...