date/time field

S

samuel

i have a date/time field 12/9/2005 9:20:00 AM

i want to extract 3 different fields
month - 12
year - 2005
hour - 09

if it was 9:20 PM
i would want the hour to be converted to 21
 
K

Ken Snell \(MVP\)

Month:
Format(YourDateTimeFieldName, "m")

Year:
Format(YourDateTimeFieldName, "yyyy")

Hour:
Format(YourDateTimeFieldName, "h")
 
D

Douglas J. Steele

Month(MyDateTimeField), Year(MyDateTimeField) and Hour(MyDateTimeField)
respectively
 
S

samuel

fantastic. thanks.

Format(YourDateTimeFieldName, "m")

what would i change to convert the number to text ? (jan, feb, march) ?
 
K

Ken Snell \(MVP\)

Check the Help information for the Format function. It gives all the
different options there.
 
Top