Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: VB5,VB6
Expertise: beginner
Aug 18, 2001

TimeToSeconds - Convert a time value into a number of seconds

' Converts a time value to a numeric value in seconds
' Example:
'    MsgBox TimeToSeconds(TimeSerial(3, 5, 20)) --> 11120
Function TimeToSeconds(ByVal newTime As Date) As Long

    TimeToSeconds = Hour(newTime) * 3600 + Minute(newTime) * 60 + Second _
        (newTime)
    
End Function
Francesco Balena
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date