From seconds(long) to date in vb .net

  • Thread starter Thread starter funzia
  • Start date Start date
F

funzia

Hello!
I must convert seconds (long format) into common data format (yy/mm/dd
hh:mm:ss).
Please help me!
Thanks!
 
funzia said:
I must convert seconds (long format) into common data format (yy/mm/dd
hh:mm:ss).

Check out 'DateTime' ('Date' in Visual Basic) and its methods/properties.
 
1 second is 1/86400 part of a day.

so, to convert it to a datetime you must use:
Date.FromOADate(cdbl(seconds)/86400)
 
Back
Top