+ Reply to Thread
Results 1 to 4 of 4

Is it possible to convert this date cell to 2018-06-05?

Hybrid View

  1. #1
    Registered User
    Join Date
    03-29-2018
    Location
    Singapore
    MS-Off Ver
    9
    Posts
    60

    Is it possible to convert this date cell to 2018-06-05?

    Attached the excel spreadsheet. Wonder if it is possible.
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,829

    Re: Is it possible to convert this date cell to 2018-06-05?

    You can use this formula in B1:

    =IF(LEN(A1)-LEN(SUBSTITUTE(A1,"-",""))=2,A1,TEXT(DATE(RIGHT(A1,4),MATCH(MID(A1,5,3),{"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"},0),MID(A1,9,2)),"yyyy-mm-dd"))

    then copy down as required.

    Hope this helps.

    Pete

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Is it possible to convert this date cell to 2018-06-05?

    Try this
    Formula: copy to clipboard
    =IFERROR(TEXT(--SUBSTITUTE(MID(A1,5,7)&RIGHT(A1,4)," ",", ",2),"yyyy-mm-dd"),A1)

    v A B
    1 Mon Jun 04 17:34:48 GMT+08:00 2018 2018-06-04
    2 2018-06-05 2018-06-05
    3 2018-06-04 2018-06-04
    4 2018-06-04 2018-06-04
    5 2018-06-03 2018-06-03
    6 2018-06-06 2018-06-06
    7 Tue Jun 05 12:03:13 GMT+08:00 2018 2018-06-05
    8 2018-06-05 2018-06-05
    9 2018-06-05 2018-06-05
    Or a little-bit shorter
    Formula: copy to clipboard
    =IFERROR(TEXT(--(MID(A1,5,6)&", "&RIGHT(A1,4)),"yyyy-mm-dd"),A1)
    Last edited by AlKey; 06-18-2018 at 10:43 AM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Registered User
    Join Date
    03-29-2018
    Location
    Singapore
    MS-Off Ver
    9
    Posts
    60

    Re: Is it possible to convert this date cell to 2018-06-05?

    =IFERROR(TEXT(--(MID(S3,5,6)&", "&RIGHT(S3,4)),"yyyy-mm-dd"),S3)

    Wow thank you this works like a charm

    Thank you everyone!

+ 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] Convert Dates from Apr 11, 2018 format to numeric format MM/DD/YYYY
    By worswick25 in forum Excel General
    Replies: 16
    Last Post: 04-17-2018, 06:38 AM
  2. Need to convert "Fri Feb 23 2018 00:10:12 GMT+0100" to a usable Date and time
    By davidkruyt in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 02-28-2018, 02:30 AM
  3. Covert date and time from 01/02/18 1326 to 01/02/2018 13:26
    By mnhim001 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-08-2018, 02:04 PM
  4. [SOLVED] Amend VBA to add dd-mm-yyyy at end of file name as it show 5-2-2018 instead of 05-02-2018
    By robertguy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-05-2018, 10:58 AM
  5. Replies: 3
    Last Post: 01-28-2018, 07:15 PM
  6. how to sort Week no- Year (04-2018, 05-2019, 07-2018) in pivot chart.
    By sahana108 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-23-2018, 09:07 AM
  7. Fiscal Year 2018 ( Feb 4, 2017 - Feb 3, 2018)
    By chethan1333 in forum Excel General
    Replies: 1
    Last Post: 05-09-2017, 08:40 AM

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