Avatar of 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.  
Crystal Reports

Avatar of undefined
Last Comment

8/22/2022 - Mon

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

Open in new window

Mike McCracken

Try this one

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


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.
Your help has saved me hundreds of hours of internet surfing.
Mike McCracken

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

thanks for all of the input.   It is greatly appreciated.!!!!