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

How to Get Time

P: 553
how to get the Current time parts seperately i.e hour,min, sec in seperate fields ?

i need to write a code which will do something like this:

- If hour=8 AND min=10 AND sec=40 Then something

Jul 18 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 1,206
There are built-in functions for returning hour, minute and second.
Expand|Select|Wrap|Line Numbers
  1. Hour(Now()) 'returns the hour of the current time
  2. Minute(Now()) 'returns the minutes of the current time
  3. Second(Now())' returns the seconds of the current time
Jul 18 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.