Second (time)‘yields a range from 0-59

‘example MsgBox (Second("12:50:05 PM")) 'returns 5 MsgBox (Second("21:33:17")) 'returns 17 MsgBox (Second("9:48AM")) 'returns 0

Skip to content
# Tag: certain time

## What is the syntax to return a second for a given time?

## What is the syntax to return a minute for a given time?

## What is the syntax to return an hour for a given time?

Second (time)‘yields a range from 0-59

‘example MsgBox (Second("12:50:05 PM")) 'returns 5 MsgBox (Second("21:33:17")) 'returns 17 MsgBox (Second("9:48AM")) 'returns 0

Minute(time)‘yields a range from 0-59

‘example MsgBox (Minute("4:33:05 PM")) 'returns 33 MsgBox (Minute("23:57:17")) ' returns 57 MsgBox (Minute("9:48AM")) ' returns 48

Hour(time)‘yields a range from 0-23

‘example MsgBox (Hour("2:12:42 PM")) 'returns 14 MsgBox (Hour("22:32:57")) 'returns 22 MsgBox (Hour("12:32AM")) 'returns 0