Convert time displayed as 6:05:00 PM to 18:05 in Excel for import into Access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Annerb
    New Member
    • Jan 2013
    • 11

    #1

    Convert time displayed as 6:05:00 PM to 18:05 in Excel for import into Access

    I have a column of data in Excel with times displayed stored using the 12 hr clock. However, it is displayed in the cell as 24 hr. So, I see 18:15 in the cell but when I select it, the entry is 06:15:00 PM. I need the actual entry to be 18:15. How can I convert this to the 24 hr clock?

    Right now my cells are formatted as Time, with Type being "13:30".
  • Stewart Ross
    Recognized Expert Moderator Specialist
    • Feb 2008
    • 2545

    #2
    When you mention the 'Type being "13:30"' I think you are confusing how a time is formatted for display (13:30 being an example of 24-hour format) with how a date/time value is stored.

    Dates and times in the MS Office applications are stored as numbers. The date is stored as the integer part of the number, and the time as the decimal part of the number, where 0.25 is 6am, 0.5 is 12 mid-day, 0.75 is 6pm, and 0 is midnight.

    Your Excel time values seem to be formatted by default for display in 24-hour time format, but when you click within the cell you see the 12-hour version (I have no idea why). The display format has no effect on how the value is stored, which as mentioned is as the decimal part of the date/time value.

    The values in your date/time cells should import directly into Access without problems regardless of whether or not they are formatted as 12 hour or 24 hour time values for display.

    -Stewart
    Last edited by Stewart Ross; Jan 24 '13, 09:44 PM. Reason: Found out what 13:30 type was

    Comment

    • Rabbit
      Recognized Expert MVP
      • Jan 2007
      • 12517

      #3
      Access can parse a 12 hour time.

      Comment

      Working...