+ Reply to Thread
Results 1 to 5 of 5

Excel 2010 - Extracting hour value from HH:MM:SS time - formatting issue

  1. #1
    Registered User
    Join Date
    02-08-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    6

    Excel 2010 - Extracting hour value from HH:MM:SS time - formatting issue

    Hello!

    I have a long string of data of times (HH:MM:SS format) from which I need to extract the hour value (ie. 21:09:11 needs just 21)

    Now the issue is when I click into the cells it gives me the value in a different format (H:MM:SS AM/PM) so when I try to use text to columns or use the formula to remove the 6 characters to the right of the hour value it gives me a different value to the one I need.

    For example Text to columns gives me the hour value but for the am/pm figure meaning when I want "21" as the hour value it actually just gives me "9"

    Test 1.xlsx

    I have attached an example, have tried changing the format but it stays the same.

    Any help would be most appreciated.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Excel 2010 - Extracting hour value from HH:MM:SS time - formatting issue

    Perhaps in B2 and copy down.

    =HOUR(A2)

    Format as general.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    02-08-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Excel 2010 - Extracting hour value from HH:MM:SS time - formatting issue

    Thank you so much! I was expecting such a complicated solution to this but I had no idea it would be so easy. Thank you so much!

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Excel 2010 - Extracting hour value from HH:MM:SS time - formatting issue

    .......................

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Excel 2010 - Extracting hour value from HH:MM:SS time - formatting issue

    asimbig,

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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