r/visualbasic • • Jun 08 '12

Need help with some coding time?

What I need the time output in a 24 hour output to look like: 07:53 or 14:34

What I have

Dim todaystime As Date

todaystime = Format(Now,"hh:mm")

what this outputs

3:00:00 AM

need:

03:00

5 Upvotes

3 comments sorted by

View all comments

3

u/eight26 Jun 08 '12
todaystime = Hour(Now()) & ":" & Minute(Now())