If you want to show a time with a precision of seconds, run a single
datediff to get the total number of seconds using the "s" datepart.
Take that integer value and run it though a formatting function to
break it into hours and minutes. You can probably find a formatting
function that does this on cflib.org.
Good luck,
Mike Chabot
On Feb 18, 2008 7: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:299316
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4