+ Reply to Thread
Results 1 to 8 of 8

Formatting dates as Text to a Date in excel

  1. #1
    Registered User
    Join Date
    01-31-2015
    Location
    New York
    MS-Off Ver
    2021
    Posts
    53

    Formatting dates as Text to a Date in excel

    I have a date field in a worksheet where the dates are being exported as text into excel. See below.


    ?*
    Aug 28, 2024 05:00 PM (PST)

    I need to convert the text to a date. Is there a formula to convert the below to a Date in excel?

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2502 (Windows 11 Home 24H2 64-bit)
    Posts
    89,551

    Re: Formatting dates as Text to a Date in excel

    Still using Excel 2021?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    01-31-2015
    Location
    New York
    MS-Off Ver
    2021
    Posts
    53

    Re: Formatting dates as Text to a Date in excel

    Yes excel 2021 but also have access to Office 365.

    The dates in the file are different in two columns.

    Tue, Sep 03, 2024 10:31 AM (Using this formula to convert this one =DATEVALUE(MID(A3,10,2)&"-"&MID(A3,6,3)&"-"&MID(A3,14,4)) it is not converting the one below.

    Aug 28, 2024 05:00 PM (PST)

    Thank you!

  4. #4
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,396

    Re: Formatting dates as Text to a Date in excel

    Power Query
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-31-2015
    Location
    New York
    MS-Off Ver
    2021
    Posts
    53

    Re: Formatting dates as Text to a Date in excel

    Thank you!

  6. #6
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,725

    Re: Formatting dates as Text to a Date in excel

    If those really are the only formats, maybe:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    16,214

    Re: Formatting dates as Text to a Date in excel

    I had no trouble using the DATEVALUE() function coupled with LEFT() function to remove the time zone information.

    1) LEFT(A3,LEN(A3)-6). Here I am assuming that the time zone text will always be 5 characters plus an extra character to get rid of the space between the time and the time zone. If the text strings are not that consistent, then additional computation would be needed to correctly remove the time zone information.
    2) The DATEVALUE() function can then convert the text to number =DATEVALUE(LEFT(A1,LEN(A1)-6)). The DATEVALUE() function uses the default formats in your OS regional and language settings to decide what text it can understand. My OS settings match fairly well with mmm dd, yyyy hh:mm PM, so my copy of Excel has no difficulty with this text.

    Does that help?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  8. #8
    Registered User
    Join Date
    01-31-2015
    Location
    New York
    MS-Off Ver
    2021
    Posts
    53

    Re: Formatting dates as Text to a Date in excel

    Thank you!

+ 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] conditional formatting and dates - is one date less than x week before another date
    By moneypennie21 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-30-2019, 07:51 AM
  2. Conditional Formatting: One date between two other dates
    By kyohnke in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-04-2018, 03:37 PM
  3. Formatting Cells with Date or Text Values in a Conditional Formatting Formula
    By Phil Hageman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-15-2014, 09:36 AM
  4. Replies: 4
    Last Post: 08-29-2013, 11:23 AM
  5. Replies: 0
    Last Post: 01-30-2013, 07:05 PM
  6. [SOLVED] Formatting text dates & times in Excel is a Bind!
    By Patish in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-04-2012, 01:57 PM
  7. [SOLVED] Date formatting in Excel VBA Text Box
    By TimN in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-06-2006, 04:50 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