|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Calculating hours from one datetimestamp to another
Hi guys
I got a problem which i couldn't resolve with the manual. I need to calculate the amount of hours from one time stamp to another. The timestamps could be like this: 03-23-2005 12:00 <----> 05-25-2005 14:00 The minuts will always be 00. How can this be done? |
|
#2
|
|||
|
|||
|
<cfset originalTimestamp1 = "03-23-2005 12:00" />
<cfset originalTimestamp2 = "05-25-2005 14:00" /> <cfset timestamp1 = parseDateTime( originalTimestamp1 ) /> <cfset timestamp2 = parseDateTime( originalTimestamp2 ) /> <cfdump var="#dateDiff( 'h', timestamp1, timestamp2 )#">
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#3
|
|||
|
|||
|
Thanks - Just what i needed.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Calculating hours from one datetimestamp to another |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|