Solved

How to convert MS Access time format to 24 hour format

Posted on 2009-04-10
3
1,275 Views
Last Modified: 2012-08-14
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

Thanks
0
Comment
Question by:meperera
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 50

Accepted Solution

by:
Gustav Brock earned 500 total points
ID: 24114060
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:

hh:nn:ss

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

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

/gustav
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 24114151
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.
0
 
LVL 12

Expert Comment

by:Dimitris
ID: 24115452
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
---------------------------
0

Featured Post

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Access Database 2007 - automating reports being sent by email 2 56
T-SQL: Only Wanting One Record 8 61
Can not open the Access Help ? 3 38
office 2016 license quastion 3 43
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question