• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1881
  • Last Modified:

converting current time to seconds vb.net

Hello is there an easy way to convert the current time to seconds in vb.net?  For example if the time was 2:30 pm the seconds would be 52200, i can do this easly with a few calculations using military time in vb.net, I was just wondering if there is a simple function i can use?
0
tentavarious
Asked:
tentavarious
1 Solution
 
FocusynCommented:
Yep - this is simple -

Dim intTotalSeconds as Integer
intTotalSeconds = DateTime.Now.TimeOfDay.TotalSeconds

That's it!
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now