Here’s a quick Microsoft Access tutorial video I found about applying formatting to the date/time data type control concentrating on the two digit hour time format that doesn’t always show up in two digit form.
Even if you create a custom date/time format within Microsoft Access, the two-digit hour which is supported using the convention of “hh” via the format property doesn’t always work. It will show a single digit hour even though you’ve specified the right code. Take a look at the video below.
Microsoft Access Tutorial – Working With Two Digit Hour Time Formats
In the video tutorial, it mentioned one of three ways to handle date/time formats:
- Using the properties for a chosen field in table or form designs.
- Using the higher level of the Windows operating system.
- Using a customised Input Mask for the specified field.
There are other methods too including using Access VBA code but unless you are going to re-use and add to the complexity of date/time formatting with other tasks and functionality, this maybe deemed overkill!
If you want to use the Input Mask method, the following code table will assist you:
Here’s another more detailed article from the Microsoft Office website about adding and customising date and time formats.
If you are going to help other users and keep control of data inputting, then ideally you need to apply your property changes including the date/time formatting at the form level and set the default look and feel globally at the table level.
Of course queries can also take advantage of this property (as shown in the Microsoft Access tutorial) which if used as expressions in your calculations will lock the values as read only.
All this and more in learning about tables, queries and forms can be found in my MS Access database eBook bundle collection which is a special discounted offer and comes with a money back guarantee and a 30 day email support too.