I need to get the number of days contained within a couple of dates on mysql.
For example: Check in date 12-04-2010 Check out date 15-04-2010 and the day difference would be 3
I hope that was clear
Thanks
...
Hi stack, i'm working on an app that loads some data from xml file from internet.
Is this a good way to develop iPhone apps??...I think xml is more light than SQlite database...
Basically my logic is:
1 - Parsing Xml file from internet to retrive the data
2 - Load data on device
Security?..other stuff??..
Thanks
Mat
...
Hi there,
I've got kind of a tricky question, I already searched every related question on Stackoverflow and neither solved my conundrum, although I think I'm running in circles, so here's the question:
I've got this code:
$val = (strtotime('2010-03-22 10:05:00')-strtotime('2010-03-22 09:00:00'))
This returns correctly $val = 3900 ...
I used core data to do this:
NSManagedObjectContext *m = [self managedObjectContext];
Foo *f = (Foo *)[NSEntityDescription insertNewObjectForEntityForName:@"Foo"
inManagedObjectContext:m];
f.created_at = [NSDate date];
[m insertObject:f];
NSError *error;
[m save:&error];
Where ...
How can I add the suffix on the day number of a unix date?
I'll explain. I have a TextMate bundle snippit that writes out today's date. It uses unix date and formatting. Here is the code:
`date +%A` `date +%d` `date +%B` `date +%Y`
It outputs:
Monday 22 March 2010
I would like to add the suffix to the day (st, nd, rd and th) like s...
Hi
I have some code which builds an array of date ranges. I then call a function (from the jquery UI datepicker), passing it a date, and compare that date with dates in the array. I'm doing it this way because the dates are stored in a cms and this is the only way I can output them.
Unfortunately my code only checks the first date ran...
I know how to use NSTimeZone to derive the offset for the current time in another time zone. NSDate always returns relative to GMT, so how do I derive a string with the proper time zone information? i.e. I take the current time where I am (in EST) and using NSTimeZone end up subtracting the 3 hours necessary to represent the time in PST....
What's the date literal for JSON/JavaScript ( if such thing does exists? )
...
Hi, I'm trying to get the unix time for date strings that are formatted like so:
'second sunday of march 2010'
'first sunday of november 2010'
I was under the impression that strtotime could handle such a string, but apparently not, as this returns false. How can I convert to unix time when given a day of week, which one of those in t...
Ok, I need something like this:
datediff(second, date_one, date_two) < 1
dates are stored in a column 'datetime' type
UPDATE
I want to find dates which differ in less than several (say, 10) seconds
...
I want to add days to a date to get a new date in Java. How to achieve it using the Calender class.
Calender dom = new GregorianCalender(d, m y);
is the instance of my date of manufacture and I want to reach to date of expiry adding some 100 days to the current date and store it in doe but unable to do that.
Any help would be appreci...
Hi
For most records this field is null. I need to wake up only some records.
The table is very big and I want to know which records to wake up. I don't want database to seek every row. Could you show me your idea?
...
Does anyone have a good algorithm to calculate what date Good Friday falls on given the year as an input? Preferably in C#.
...
How do you get the last day of the last month in csh?
Here is the code so far. The cal command below almost works if you execute it from the (FreeBSD sh) command line, but I'm having trouble escaping it properly to run within a script. By almost work, I mean it returns 31, when the last day of February 2010 is 28.
#!/bin/csh
set last...
HI Everyone,
So far I have this:
FormatDateTime(negativeItemsRS("ItemDate"), 0)
Its displaying the date in the format of mm/dd/yyyy. I want to convert that to a dd/mm/yyyy
Please help not sure how to do this.
Thanks,
...
Hi
In SQL Server 2008:
I have two tables, dtlScheme and dtlRenewal, with a one to many relationship (one scheme can have many renewals). dtlRenewal has a unique key (dteEffectiveDate, dtlSchemeID).
Now suppose I have the following data in dtlRenewal:
dtlRenewalID dtlSchemeID dteEffectiveDate
1 1 1/1/2005
2 ...
hi
is there any php classes or functions, which will gives us all the days from specific duration? for example, if i want a list of dates from 25/03/2010 (25th march 2010) to 15/05/2010 (15th May 2010), it will give me:
25/03/2010
26/03/2010
26/03/2010
....
....
....
14/05/2010
15/05/2010
thanks a lot for any help!
...
In VB, what coding could I use to calculate the 5th working day of every month? And if the 5th day is a holiday to go up one day.
...
I'm rather new to coding so I'm sure this is fairly easy, but I have not been able to figure this out. I'm building a report in reporting serivces, sql 2005. I have 4 tables: people, event log, program enrollment and program info. I have clients that could be enrolled in numerous programs. I need to be able to find a client's first enrol...
I found the regular expression for MM/DD/YYYY at http://www.regular-expressions.info/regexbuddy/datemmddyyyy.html but I don't think I am using it correctly.
Here's my code:
$date_regex = '(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d';
$test_date = '03/22/2010';
if(preg_match($date_regex, $test_date)) {
echo 'this d...