Not sure this is the most efficient but you could do something like:

<cfset fooDate = createdatetime(2008,2,19,15,07,0) />
<cfset gooDate = createdatetime(2009,2,25,18,0,10) />

<cfoutput>#fooDate# | #gooDate#</cfoutput><br />

<cfset fDate = gooDate - fooDate />

<cfset days = int(fDate) />
<cfset hoursfull = (fDate - days) * 24 />
<cfset hours = int(hoursfull) />
<cfset minsfull =  (hoursfull - hours)*60 />
<cfset mins =  int((hoursfull-hours)*60) />
<cfset secsfull = minsfull - mins />
<cfset secs = int((secsfull)*60) />


<cfoutput>
#fDate#<br />
days = #days#<br />
hoursfull = #hoursfull#<br />
hours = #hours#<br />
minsfull = #minsfull#<br />
mins = #mins#<br />
secsfull = #secsfull# <br />
secs = #secs#<br />
</cfoutput><br />


On Feb 18, 2008 6:05 PM, Steve Good <[EMAIL PROTECTED]> wrote:
> Hi gang,
>
> I am trying to evaluate the time elapsed between two stored ODBC dates.
> I thought that dateDiff() would be my answer, but I get some very
> strange results with the code I thought would work.  I have never used
> dateDiff() before so perhaps I am doing something wrong.  Here is the
> code I thought would work.  If anyone knows what I did wrong please let
> me know.  Thanks!
>
> <cfoutput>
> <cfset h = '#dateDiff("h", cleanUp.winOpenTime, cleanUp.winCloseTime)#'>
> <cfset m = '#dateDiff("m", cleanUp.winOpenTime, cleanUp.winCloseTime)#'>
> <cfset s = '#dateDiff("s", cleanUp.winOpenTime, cleanUp.winCloseTime)#'>
> <cfset evaluatedTime = "#h#" & ":" & "#m#" &":" & "#s#">
> #cleanUp.winOpenTime# - #cleanUp.winCloseTime# = #evaluatedTime#
> </cfoutput>
>
> --
>
> ~Steve
> http://goodcf.instantspot.com/blog
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299318
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to