Skip to content

Formatting Time and Dates

How to format times and/or dates in the way you want to see them.

Q:  M. Schiller wants to know how to convert a time to the 12 hour time format.

A:  There is no need to convert – just use the Format function to format dates and/or times in the way you want to see them.  Access Date/Time fields contain both a date and a time, but you can choose to display only the date, or only the time.  To display just the time in the 12 hour time format with leading zeroes, for example, you could use the following expression in a query, and place the resulting calculated field on a form or report.

12HourTime: Format([InTime],”hh:nn:ss ampm”)

 

If you want to display times in the 24-hour format without leading zeroes, use the following expression:

24HourTime: Format([InTime],”h:n:s”)

 

If you have worked with date and time formatting in Word or Excel, note that the formatting expressions are different – maybe one day Microsoft will get their act together and standardize these expressions for all Office components.

About this author

Office 2024 - all you need to know. Facts & prices for the new Microsoft Office. Do you need it?

Microsoft Office upcoming support end date checklist.