+ Reply to Thread
Results 1 to 7 of 7

How can I extract an undated time value from a date/time field?

  1. #1
    Registered User
    Join Date
    04-17-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2000
    Posts
    3

    How can I extract an undated time value from a date/time field?

    I am working with a long list of readings from a noise meter (1 per sec = 28,800 rows for an 8 hour session)

    In column A I have a date/time field = e.g. "12/04/2013 10:37:20". In column B are the readings.
    On another sheet, I am doing various calcs on consecutive 5-min (300 row) sets of these readings: and in order to do a chart, I need to put just the TIME section of the date time field (i.e. "10:37:20") into a Time column, to indicate the start time of each dataset.

    The only way I have found to do this is to copy the whole date/time column to a text editor, and then copy the truncated column back into Excel. Which is a nuisance, because (a) only I know how to do this, and (b) it has to be done every time new data is introduced.

    Question: can anyone tell me a formula or function which will do this automatically within Excel, thus removing the need for manual editing?

    This is my first venture into the Forum - so forgive me if this question has already been answered elsewhere...

    NPB

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: How can I extract an undated time value from a date/time field?

    To get the TIME from a cell containing Date+Time, use

    =MOD(A1,1)

    Hope that helps.

  3. #3
    Registered User
    Join Date
    04-17-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2000
    Posts
    3

    Re: How can I extract an undated time value from a date/time field?

    Quote Originally Posted by Jonmo1 View Post
    To get the TIME from a cell containing Date+Time, use

    =MOD(A1,1)

    Hope that helps.
    Thanks for the suggestion. This formula is still giving me a date/time field, but with 01/01/00 substituted as the date. What I need to extract is just the last 8 characters containing the TIME info. Does this work in your more recent version? (I have not updated because I'm worried about VBA compatibilty - and also because I'd rather keep the money!)

    Any other ideas?

    NPB

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: How can I extract an undated time value from a date/time field?

    Format the cell with the formula as just a time.

  5. #5
    Registered User
    Join Date
    04-17-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2000
    Posts
    3

    Re: How can I extract an undated time value from a date/time field?

    Quote Originally Posted by Jonmo1 View Post
    Format the cell with the formula as just a time.
    Of course!

    As so often, a simple answer was staring me in the face. Problem solved - many thanks.

    NPB

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: How can I extract an undated time value from a date/time field?

    Great, glad to help.

  7. #7
    Registered User
    Join Date
    05-05-2013
    Location
    silverdale
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: How can I extract an undated time value from a date/time field?

    Hahaha,


    So glad I trolled through to find this answer as it helps me out 100% on a preadsheet I am working on presently!!

    So simple....

    Rob

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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