+ Reply to Thread
Results 1 to 16 of 16

Extract time from a date with time (3/1/14 12:05 AM)

  1. #1
    Registered User
    Join Date
    08-13-2013
    Location
    My House, AL.
    MS-Off Ver
    Excel 2010
    Posts
    39

    Extract time from a date with time (3/1/14 12:05 AM)

    I am trying to extract JUST the hour from the following date format 3/1/14 12:05 AM.

    I tried the =Hour( function, but it returns 12:00 AM for every result.

    Thank you in advance for all the help!

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Extract time from a date with time (3/1/14 12:05 AM)

    What result do you expect?

    12:00 AM = hour 0

    0 formatted as Time = 12:00 AM
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    08-13-2013
    Location
    My House, AL.
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Extract time from a date with time (3/1/14 12:05 AM)

    ok for 3:14 pm...the =hour( function returns 12:00AM

  4. #4
    Registered User
    Join Date
    08-13-2013
    Location
    My House, AL.
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Extract time from a date with time (3/1/14 12:05 AM)

    this thread is not solved...but it's marked solved

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Extract time from a date with time (3/1/14 12:05 AM)

    Can you post a SMALL sample file that shows that result?

    A SMALL file is about 20 rows worth of data.

  6. #6
    Registered User
    Join Date
    08-13-2013
    Location
    My House, AL.
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Extract time from a date with time (3/1/14 12:05 AM)

    this file is huge... is a screen shot sufficient?

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Extract time from a date with time (3/1/14 12:05 AM)

    We can try it.

  8. #8
    Registered User
    Join Date
    08-13-2013
    Location
    My House, AL.
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Extract time from a date with time (3/1/14 12:05 AM)

    here's a screen shot
    Attached Images Attached Images

  9. #9
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,367

    Re: Extract time from a date with time (3/1/14 12:05 AM)

    Assume your data in D2:

    =D2-INT(D2)

    and formatted as time with format custom h:mm AM/PM

  10. #10
    Registered User
    Join Date
    08-13-2013
    Location
    My House, AL.
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Extract time from a date with time (3/1/14 12:05 AM)

    I have even tried doing fixed width columns but as soon as you isolate the hour it displays (12:00 am).

  11. #11
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,367

    Re: Extract time from a date with time (3/1/14 12:05 AM)

    Glad it works...

    Cheers

  12. #12
    Registered User
    Join Date
    08-13-2013
    Location
    My House, AL.
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Extract time from a date with time (3/1/14 12:05 AM)

    Haven't tried your solution yet. I will first thing tomorrow. thanks!

  13. #13
    Registered User
    Join Date
    08-13-2013
    Location
    My House, AL.
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Extract time from a date with time (3/1/14 12:05 AM)

    Quote Originally Posted by azumi View Post
    Assume your data in D2:

    =D2-INT(D2)

    and formatted as time with format custom h:mm AM/PM

    Not sure what this formula is supossed to do, but it does not isolate the hour.... or even allow me to isolate the hour. Can you elborate please?

  14. #14
    Registered User
    Join Date
    08-13-2013
    Location
    My House, AL.
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Extract time from a date with time (3/1/14 12:05 AM)

    bump...anyone have a solution for me?

  15. #15
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Extract time from a date with time (3/1/14 12:05 AM)

    Based on your screencap...

    If you change the format of cell E6 to General what result do you get?

  16. #16
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,367

    Re: Extract time from a date with time (3/1/14 12:05 AM)

    Maybe this example could help you
    Attached Files Attached Files

+ 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. [SOLVED] Extract time from date and time text string
    By pattem2013 in forum Excel General
    Replies: 5
    Last Post: 09-07-2013, 03:20 AM
  2. How can I extract an undated time value from a date/time field?
    By NPB in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-06-2013, 08:47 AM
  3. [SOLVED] Extract a time from a cell with date and time stamp and then perform calculations
    By Marcos Aristotelous in forum Excel General
    Replies: 3
    Last Post: 10-31-2012, 04:36 AM
  4. Replies: 4
    Last Post: 12-02-2011, 02:41 PM
  5. Replies: 4
    Last Post: 03-23-2010, 12:44 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