We help IT Professionals succeed at work.

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

tambrosi
tambrosi asked
on
81 Views
Last Modified: 2019-03-03
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
Comment
Watch Question

KimputerIT Manager
CERTIFIED EXPERT

Commented:
DateAdd(ā€œsā€, 908022961, ā€œ01/01/1990ā€) 

Open in new window

Mike McCrackenSenior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013

Commented:
Try this one

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

mlmcc

Author

Commented:
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.
Senior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

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

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions