• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1299
  • Last Modified:

How to convert MS Access time format to 24 hour format

Hi Experts ,

I have a database field with the time in the following format

10/04/2009 2:50:00 PM

I need to convert that to 14:50:00

Could someone please show me how to

1 Solution
Gustav BrockCIOCommented:
Date/time in a field is not of a specific format.
But you can choose to have it displayed in a specific format.
The format string you request is:


Can be inserted in the format property of a field or used with the function Format:

strTime = Format([YourDateTimeField], "hh:nn:ss")

if your app is international or maybe you use different delimiters for time, you can use "short time" as the 2nd argument in the format command. THis takes the international settings as defined in control panel.
DimitrisSenior Solution ArchitectCommented:
try this
Format("10/04/2009 2:50:00 PM", "dd/MM/yyyy hh:mm:ss")
it will convert it to
10/04/2009 14:50:00
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now