From number of seconds in a day to a formatted time string
    TJB 
    broughtj at gmail.com
       
    Tue Jun 12 10:28:38 PDT 2012
    
    
  
I am working with some financial data that comes in binary files. 
It has two fields in particular that I am trying to convert to 
human readable formats. The first is a date string like 
"20060621", which I am able to work with just fine. But then it 
has a field called ttim, which is the number of seconds from 
midnight at which a trade occurred. For example, a trade 
occurring at 28824 seconds in the day would have taken place at 
"8:00:24" (only resolution to the second).
My question is: how do I convert the number of seconds (like 
28824) to a formatted time string (like 08:00:24)?  I looked in 
std.datetime, but it isn't obvious which functions I should use.
You help and suggestions are much appreciated!
TJB
    
    
More information about the Digitalmars-d-learn
mailing list