Results 1 to 5 of 5
  1. #1
    Trainman is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Torrance, CA, USA
    Posts
    3

    Question [Access 2003] Displaying 24 Hour Time


    I need to display time in 24 hour time, such as 0001, 0930, 1345, 2210. While using the Short Time format, I can get 11:15, but if I change a time to 15:30 I get an error. I need to get the ":" to go away also. How do I go about doing this? I've tried to use the data mask, but I just don't get it.

  2. #2
    Join Date
    Mar 2009
    Posts
    5
    =IIf(Len(Hour([text2]))=1,"0" & Hour([text2]) & IIf(Len(Minute([text2]))=1,"0" & Minute([text2]),Minute([text2])),Hour([text2]) & IIf(Len(Minute([text2]))=1,"0" & Minute([text2]),Minute([text2])))

    [text2] is your Short Time format control

  3. #3
    Trainman is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Torrance, CA, USA
    Posts
    3
    tzh1600, Thanks for the reply.
    Where does this go and how does this work?

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I think Format([YourTime],"hhnn") should do it.

  5. #5
    Join Date
    Mar 2009
    Posts
    5
    Quote Originally Posted by RuralGuy View Post
    I think Format([YourTime],"hhnn") should do it.

    Yes, =format([YourTime],"hhmm")

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

Similar Threads

  1. How to merg fields in MS Access 2003
    By vahidam in forum Queries
    Replies: 0
    Last Post: 02-17-2009, 08:47 AM
  2. converting from Access 2003 to Access 2007
    By LawrenceLau in forum Access
    Replies: 6
    Last Post: 11-20-2008, 03:53 PM
  3. displaying the time 12:00:00 AM
    By kfoyil in forum Access
    Replies: 4
    Last Post: 12-05-2006, 11:02 PM
  4. Replies: 1
    Last Post: 09-06-2006, 11:48 AM
  5. Help! Newbie needs help with Access 2003!!!
    By infernojericho in forum Access
    Replies: 0
    Last Post: 12-03-2005, 08:11 PM

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