Hour
Using the HOUR Function
In this tutorial you will learn how to use the HOUR Function.
The HOUR function returns an Integer specifying a whole number between 0 and 23, inclusive, representing the hour of the day.
=HOUR( time )
time a value that represents a valid time, be that numeric or string also.
The result is 17.
FORM
In a Form you could set the Default Value of a Textbox to
=HOUR(#5:37:24 PM#)
VBA
In a Form add a TEXTBOX control and rename it "txtHour", then you could add the following in the Load Event.
Private Sub Form_Load()
txtHour = Hour(#5:37:24 PM#)
End Sub
Course
Access Expert 11
Seminar
Access SQL 2
Search
You can find more about this by searching the website.
By: Alex Hedley
Click here to sign up for more FREE tips
|