Using MS Access/Date/time formatting

Advertisement


Question
Scott
I have a form requiring entry of Start and End time.
I have opted for the general date which allows for entry of date and time in the one operation. The reason I have done so is that the duration of an event can span over one or more days and this allows me to determine the duration easily.
Can you advise me how to format the time portion of my dates in military time, ie. 00:25 rather than 12:25AM as an example.
Hope you can help
Regards
John

Answer
You can use the format function:

Format(field,"hh:mm")

For you can just use hh:mm as the format property of the control.

Hope this helps,
Scott<>
Blog: http://scottgem.wordpress.com
Website: http://www.diamondassoc.com
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA

Using MS Access

All Answers


Answers by Expert:


Ask Experts

Volunteer


Scottgem

Expertise

I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.

Experience

I've been designing databases for over 25 years working with dBase, FoxPro, Approach and Access.

Organizations
Author of Microsoft Office Access 2007 VBA
Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing

Education/Credentials
Brooklyn College BA

©2016 About.com. All rights reserved.