Results 1 to 5 of 5
  1. #1
    vad77 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2013
    Location
    USA
    Posts
    101

    Question Military time format need to include seconds


    I am currently working on a database where my source data has the times in military format which includes the seconds; 18:45:30. All my time fields are set to data/time and format is Short Time. The Short Time format gives me military time but only down to the minute. I need to include the seconds into my time fields. I tried creating an input mask but it converts it to standard time.
    Does anyone know how I can show military time down to the seconds as in my example above?
    Thank you in advance for your responses.

    Vito

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725

  3. #3
    vad77 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2013
    Location
    USA
    Posts
    101
    I tried Long Time format but when you enter time in military format it converts it to standard time. 18:30:45 --> 6:30:45 PM

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725
    If you are in a different time zone, you will have to set a MilitaryBaseTime value.

    ?Format(Time,"HH:NN:SS")
    09:38:22

    If your military time is 4 hrs ahead of local time (add 4 hours as MilitaryBaseTime)
    ?format(Dateadd("h",4,Time),"HH:NN:SS")
    13:38:22

    You can try this which has been suggested for military time in other posts.
    ?Format(Now(), "hhnn")
    0942

  5. #5
    vad77 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2013
    Location
    USA
    Posts
    101
    Thanks I will try that formatting. This may all be for nothing as I finally got a copy of sample data and time is not in military and switched back to a standard time format. But at least if they change their minds I would have a solution.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Military Time Blues
    By viperbyte in forum Forms
    Replies: 19
    Last Post: 04-14-2020, 06:45 AM
  2. Formatting military time into non-military time
    By WithoutPause in forum Access
    Replies: 3
    Last Post: 11-18-2013, 07:40 AM
  3. Replies: 42
    Last Post: 03-01-2013, 06:58 AM
  4. Convert seconds to HH:MM:SS format
    By sai_rlaf in forum Access
    Replies: 2
    Last Post: 01-19-2012, 12:57 AM
  5. Military Time
    By tshirttom in forum Access
    Replies: 3
    Last Post: 07-29-2011, 01:29 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums