Converting numeric to hh:mm:ss

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
Brad_Wells_(Guest)
Posts: 11
Joined: Tue Oct 10, 2017 12:44 pm

Converting numeric to hh:mm:ss

Post by Brad_Wells_(Guest) » Wed May 05, 2004 12:40 pm

Can someone help me with converting a numeric 999999999 to hh:dd:ss format?____I am unsure how to handle this using calculated field, or more likely fields.

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

=> RE: Converting numeric to hh:mm:ss

Post by kfleming » Thu May 06, 2004 7:02 am

Is the numeric a serial number (representing the elapsed time since a particular date) or is it mmddyyyy as a numeric?____Kathleen__R&R Support

Brad_Wells_(Guest)
Posts: 11
Joined: Tue Oct 10, 2017 12:44 pm

==> RE: Converting numeric to hh:mm:ss

Post by Brad_Wells_(Guest) » Thu May 06, 2004 11:37 am

It is a number that is in seconds. Example 90 would convert to 1:30______Also, is there now a way to have a control files output to html?____Thanks,____Brad

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

===> RE: Converting numeric to hh:mm:ss

Post by kfleming » Thu May 06, 2004 1:00 pm

Try:__str(int(sec/3600),2)+":"+str(int(mod(sec,3600)/60),2)+":"+__str(int(mod(mod(sec,3600),60)),2)____where sec is the name of your numeric field.____To output to html you can set__RI_PRINTER=H__RI_OUTFILE=myfile.html______Regards,__Kathleen__R&R Support

Post Reply