Hello everybody,

I'm working on this script to get the date difference between two dates in minutes. After doing that; I want to then deduct/subtract the value returned by the datediff function from another date value.

Here is what I'm trying to do:

Reading the two date values from a table:

<cfset timeCallPlacedOnHold = queryTmp.HoldDateTime>
<cfset timeOnHoldReleased = queryTmp.ReleasedDateTime>

For some reason the dates retuned are in this format:

Ex: "2004-09-08 12:28:56.0"

I can't understand why it adds the ".0" after the time when the value stored in the database is "2004-09-08 12:28:56"

<!--- Date diff in minutes --->
<cfset totalDateDiff = datediff("n",TimeCallPlacedOnHold,TimeOnHoldReleased)>

Now, I'm taking the value returned by the dateDiff function and subtracting it from another date

DateAdd("n",-totalDateDiff,queryTmp.FixDateTime)

The dates returned are not correct. I don't want I'm doing wrong. Can somebody please point out what I should be doing to correct this.

Best regards
cfcoder
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to