+ Reply to Thread
Results 1 to 5 of 5

Convert date and time in serial number format to text format

  1. #1
    Registered User
    Join Date
    03-08-2013
    Location
    New Orleans, LA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Convert date and time in serial number format to text format

    I have a report which has listed a bunch of transactions by their date and time in a single cell in the following format "1/2/2013 9:08:00 AM".

    I need to sort all of the transactions by the time of day regardless of the date. When I tried =right(A1, 9) it pulled out some of the serial numbers that the date is formatted in. Ist there a way to convert the serial number format to text format in order to pull the time out? Alternately, is there a way to sort by time only?
    Last edited by nda13112; 03-11-2013 at 02:40 PM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Convert date and time in serial number format to text format

    If you just want the time try this.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,855

    Re: Convert date and time in serial number format to text format

    =A1-Int(A1) will give you the time portion only. Format as Time in the new cell.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    03-08-2013
    Location
    New Orleans, LA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Convert date and time in serial number format to text format

    Thank you so much!

  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: Convert date and time in serial number format to text format

    One way...

    =MOD(A1,1)

    Format as Time
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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