+ Reply to Thread
Results 1 to 6 of 6

Convert 12 hour to 24 hour time

  1. #1
    Registered User
    Join Date
    12-28-2010
    Location
    Atlanta, GA
    MS-Off Ver
    2003 and 2010
    Posts
    27

    Convert 12 hour to 24 hour time

    Hey,
    I have some logs from TV stations, and some come in AM/PM time format, but I need it in 24 hour format to upload to the database (HHMM). I tried going to format and doing a special format to type in HHMM, but that doesn't convert to 24 hour, it just drops the AM/PM.

    Thanks!
    Last edited by RussellNonBrand; 01-26-2011 at 03:01 PM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Convert 12 hour to 24 hour time

    Try [hh]mm
    Does that work?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    12-28-2010
    Location
    Atlanta, GA
    MS-Off Ver
    2003 and 2010
    Posts
    27

    Re: Convert 12 hour to 24 hour time

    Forgot to mention this before... but that seems to add 12 hours... i.e. 1pm turned into 2500.

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Convert 12 hour to 24 hour time

    Slight correction to ChemistB's suggestion:

    put a : (colon) after the [hh]

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Convert 12 hour to 24 hour time

    Hmmmm, that implies that a hidden date is being imported also. How are you importing data? Can you upload a small sample of your data in Excel? Include that one that reformats to 2500.

  6. #6
    Registered User
    Join Date
    12-28-2010
    Location
    Atlanta, GA
    MS-Off Ver
    2003 and 2010
    Posts
    27

    Re: Convert 12 hour to 24 hour time

    That's really weird. I just opened the exact same log, and this time it is formatting correctly. Oh well, problem solved! Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1