Results 1 to 3 of 3
Thread: Date Calculation
-
01-23-2010, 11:08 AM #1
Freshman
- Join Date
- Dec 2009
- Posts
- 19
- Thanks
- 0
- Thanked 1 Time in 1 Post
- Feedback Score
- 0
Date Calculation
Hi, how can I compute the difference in days between current date & Time and the ff: "12:04 AM Dec 30th, 2009"?
-
01-24-2010, 01:18 AM #2
try this code:
$diff = (time() - strtotime("12:04am Dec 30th, 2009"));
It will calculate the elapsed time in seconds and the time is compared with the time in server.
If you want to calculate the time in day you can try this:
$diff = (time() - strtotime("12:04am Dec 30th, 2009")) / 86400;science and math : Mathematics
-
01-24-2010, 02:07 AM #3
Freshman
- Join Date
- Dec 2009
- Posts
- 19
- Thanks
- 0
- Thanked 1 Time in 1 Post
- Feedback Score
- 0
how about if the date is given like this: Sun Jan 24 06:46:01 +0000 2010
how do I compute the difference between now and the given date above?
Similar Threads
-
Advanced Date Parsing with ColdFusion
By Abina in forum ColdFusionReplies: 0Last Post: 01-09-2010, 06:48 PM -
Tips for your First Date
By mastermind in forum General TalkReplies: 25Last Post: 08-31-2009, 02:40 AM -
Preparation for Perfect Date
By BrainPulse in forum General TalkReplies: 9Last Post: 03-26-2009, 09:58 PM -
Clock & Date Following Mouse
By yawez.com in forum JavaScript & AJAXReplies: 3Last Post: 12-26-2008, 02:52 PM -
My computer date is changing weirdly
By jani in forum General TalkReplies: 3Last Post: 12-02-2008, 04:11 AM


Reply With Quote

