All,
Found an oddity the other day.

I was taking 2 Date/Time values and trying to break out days, hours, minutes, 
and seconds.

I used the datediff function to pull out the number of days different,
Then used the HOURS, MINUTES, and SECONDS functions.

All except HOURS worked correctly.
HOURS(Date_Time2 - Date_Time1) = 0 (should have been 6)
MINUTES(Date_Time2 - Date_Time1) = 47 -->Correct
SECONDS(Date_Time2 - Date_Time1) = 23 -->Correct.

I was able to get around it by just doing the math myself,
But I thought HOURS was supposed to return the number of hours in a Time Stamp.
It's strange because it doesn't appear to be consistent in how the other 
functions work.

Was wondering if this was a defect or if I was just not using it correctly.

ARS 7.1 Patch 8
MS SQL Server 2005
Windows Server 2003

Thanks,
Matt P.


_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug11 www.wwrug.com ARSList: "Where the Answers Are"

Reply via email to