By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,552 Members | 893 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,552 IT Pros & Developers. It's quick & easy.

From seconds(long) to date in vb .net

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

Oct 29 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"funzia" <fu****@gmail.comschrieb:
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/>
Oct 29 '06 #2

P: n/a
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:
Hello!
I must convert seconds (long format) into common data format (yy/mm/dd
hh:mm:ss).
Please help me!
Thanks!
Oct 29 '06 #3

P: n/a
Thank you!
Bye

Oct 29 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.