Home All Groups Group Topic Archive Search About

From seconds(long) to date in vb .net

Author
29 Oct 2006 11:53 AM
funzia
Hello!
I must convert seconds (long format) into common data format (yy/mm/dd
hh:mm:ss).
Please help me!
Thanks!

Author
29 Oct 2006 12:09 PM
Herfried K. Wagner [MVP]
"funzia" <fun***@gmail.com> schrieb:
> 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.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
29 Oct 2006 12:11 PM
Theo Verweij
1 second is 1/86400 part of a day.

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


funzia wrote:
Show quoteHide quote
> Hello!
> I must convert seconds (long format) into common data format (yy/mm/dd
> hh:mm:ss).
> Please help me!
> Thanks!
>
Author
29 Oct 2006 12:33 PM
funzia
Thank you!
Bye