|
Good Day,
I have a field in my database that keeps a running total of a clock. The field is called Total.Alias.
This field can have a variety of information in it. It could be: 00:00:00 01 00:01:12 354 11:02:25 1005 09:05:36
So, in theory, the running total could be in the hundreds of days.
I need to be able to convert that time to seconds.
Can someone tell me how to do this?
Thanks!
|
|
I don't know if there is a direct function, but you can probably manually calculate it.
Assuming the field is a DateTime field, you can extract the information using
day hour minute second
functions and convert them to seconds before adding them up. So like
day({field}) * 86400 + hour({field}) * 3600 + minute({field}) * 60 + second({field})
On the other hand, if it's a string, then you can split it so that the last two chars are the seconds, ignore the colon, then take the next two as minutes, ignore the colon, then take the next two as the hour. Everything else would be the day.
Edited by Keikoku - 25 Dec 2010 at 12:12pm
|