system
October 19, 2009, 9:05pm
1
Has anyone ever converted a date time field into seconds (a numerical) field performed calculations on this field, and then converted the field back into a date and time field?
I’m trying to calculate the Mean and Median Date and Time of a set of date and times per day. For example:
01/26/2009 12:01 PM
01/26/2009 05:15 PM
01/26/2009 07:18 PM
Thanks in advance for any assistance!
mpac60 (BOB member since 2009-10-19)
system
October 19, 2009, 9:21pm
2
Welcome to B:bob:B !
Convert dates to numbers of seconds from a midnight, then do the calculation and convert the result back to a date.
You can use for instance the formula from this post to do the final conversion of seconds into a hh:mm:ss format:
Hello all. I have yet another odd issue. I’m use SQL fyi.
A column I’m pulling in a report is a number in seconds. I need to total those seconds, but I need the column to display as HH:MM:SS and also be able to run a sum on the HH:MM:SS on the table footer.
Currently I’ve gotten as far as being able to return the seconds in the universe designer as HH:MM:SS by using this in the object as a number type;
CONVERT(varchar, DATEADD(s, columnname, 0 ), 108)
This returns the column just fine, ho…
Marek Chladny (BOB member since 2003-11-27)