Link to home
Start Free TrialLog in
Avatar of tambrosi
tambrosi

asked on

Get the Time of Day from a Field that is all seconds.

Hope somebody can help with this one:
I have a field that is defined as having all seconds, how can I get the Time of Day out of that field.
field is 908022961 (seconds)
 to_date('19900101','yyyymmdd') + "starttime"/86400 as startDate,  (From SQL---but would like to use Crystal to get the Time of Day).
it will convert to this date 2018-10-10 with the above statement.  

Date is 10/10/2018,   but I need to find the time of day for this.  
Thanks
Terry
Avatar of Kimputer
Kimputer

DateAdd(“s”, 908022961, “01/01/1990”) 

Open in new window

Try this one

Time(DateAdd('s', 908022961, Date(1900,01,01)))

mlmcc
Avatar of tambrosi

ASKER

Thanks for the input that will get me the time of day which is what I asked for.  Much appreciated.

But found out yesterday I need the mmddccyy also.  
   Found out I will have to get the mmddccyy from that string also,  is that doable also.  

Vendor defined the field as "initial start time in seconds since 1/1/1990'

Any help would be appreciated.
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks for all of the input.   It is greatly appreciated.!!!!