+ Reply to Thread
Results 1 to 12 of 12

24 hour clock problems text to column

  1. #1
    Registered User
    Join Date
    03-30-2012
    Location
    Manchester, England
    MS-Off Ver
    Excel 2010
    Posts
    14

    24 hour clock problems text to column

    Hello
    I have a date and time column which i am trying to split.
    It is currently displaying like this:

    Date & time
    30-06-12 10:00
    30-06-12 11:00
    30-06-12 12:00
    30-06-12 13:00
    30-06-12 14:00
    30-06-12 15:00

    but when you click on an individual cell, in the formula window it looks like:

    30-06-2012 11:00:01 AM
    30-06-2012 12:00:01 PM

    When i do a text to columns split it only returns the time column in the 12 hour format but i want it in the 24 hour format. im sure it must be something to do with how the date and time column is formatted BEFORE i attempt the column split but i really cant seem to alter it to a format that works. Any help?

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: 24 hour clock problems text to column

    Try this

    In B1

    =LEFT(A1,FIND(" ",A1)-1)

    In C1

    =RIGHT(A1,FIND(" ",A1)-4)

    A
    B
    C
    1
    30-06-12 10:00
    30-06-12
    10:00
    2
    30-06-12 11:00
    30-06-12
    11:00
    3
    30-06-12 12:00
    30-06-12
    12:00
    4
    30-06-12 13:00
    30-06-12
    13:00
    5
    30-06-12 14:00
    30-06-12
    14:00
    6
    30-06-12 15:00
    30-06-12
    15:00
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Registered User
    Join Date
    03-30-2012
    Location
    Manchester, England
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: 24 hour clock problems text to column

    Thanks but that doesnt work. It just says #VALUE! and i dont know enough about what the formula does to try tweaking it for my data

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: 24 hour clock problems text to column

    I suggest that you upload a sample spreadsheet with about 10-15 rows of data so we could figure our a solution for you.

    To upload a file click on Go Advanced on the bottom of your screen, then click on paperclip icon and Add Files.

  5. #5
    Registered User
    Join Date
    03-30-2012
    Location
    Manchester, England
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: 24 hour clock problems text to column

    See attached
    Attached Files Attached Files

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: 24 hour clock problems text to column

    In B1

    =INT(A1)

    and format cell as Date

    In C1

    =MOD(A1,1)

    Fromat cell as Time

  7. #7
    Valued Forum Contributor
    Join Date
    12-25-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2016
    Posts
    506

    Re: 24 hour clock problems text to column

    Quote Originally Posted by andyspeak View Post
    Hello
    I have a date and time column which i am trying to split.
    It is currently displaying like this:

    Date & time
    30-06-12 10:00
    30-06-12 11:00
    30-06-12 12:00
    30-06-12 13:00
    30-06-12 14:00
    30-06-12 15:00

    but when you click on an individual cell, in the formula window it looks like:

    30-06-2012 11:00:01 AM
    30-06-2012 12:00:01 PM

    When i do a text to columns split it only returns the time column in the 12 hour format but i want it in the 24 hour format. im sure it must be something to do with how the date and time column is formatted BEFORE i attempt the column split but i really cant seem to alter it to a format that works. Any help?
    Hi, I could only guess you're using space as the delimiter for Text to Columns?
    You can just use AlKey method, or simply copy/format the timestamp to a format to "dd-mm-yy" and "hh:mm" (all depends on your objective for the splitting ;=))



    _______________________________________________________________________________________________________________________________
    1. Click on the * Add Reputation if you think someone helped you
    2. Mark your thread as SOLVED when question is resolved

    Alvin

  8. #8
    Registered User
    Join Date
    03-30-2012
    Location
    Manchester, England
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: 24 hour clock problems text to column

    That works - thanks a lot

  9. #9
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: 24 hour clock problems text to column

    You're welcome. Don't forget to thank those who helped by clicking on Add Reputation * and please mark thread as "Solved" if your issue has been resolved. (Selecting Thread Tools-> Mark thread as Solved).

  10. #10
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,720

    Re: 24 hour clock problems text to column

    alvin-chung, Don't quote whole posts -- it's just clutter. If you are responding to a post out of sequence, limit quoted content to a few relevant lines that makes clear to whom and what you are responding.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  11. #11
    Valued Forum Contributor
    Join Date
    12-25-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2016
    Posts
    506

    Re: 24 hour clock problems text to column

    Hi Jeff, ah ok

  12. #12
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: 24 hour clock problems text to column

    interesting i can split that perfectly ok with text to columns
    ah i see your problem
    in your regional settings in windows you have long and or short time set to hh:mm:ss tt
    if you change that to
    hh:mm:ss the am/pm goes away in the formula bar
    however i can still split with text to columns ok
    Attached Files Attached Files
    Last edited by martindwilson; 01-19-2014 at 11:00 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Subtracting 1 hour from 24 hour clock
    By alep002 in forum Excel General
    Replies: 7
    Last Post: 09-05-2011, 06:57 PM
  2. Default time from 12 hour clock to 24 hour clock
    By MR-77 in forum Excel General
    Replies: 3
    Last Post: 03-31-2011, 04:15 PM
  3. Decimal to 24 hour clock please.
    By Max in forum Excel Formulas & Functions
    Replies: 42
    Last Post: 09-06-2005, 06:05 AM
  4. Decimal to 24 hour clock please.
    By Max in forum Excel Formulas & Functions
    Replies: 63
    Last Post: 09-06-2005, 04:05 AM
  5. Decimal to 24 hour clock please.
    By Steved in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM

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