+ Reply to Thread
Results 1 to 5 of 5

Date formula - Change Format to YYYYMMDD from Exported Format

  1. #1
    Registered User
    Join Date
    07-28-2012
    Location
    Morgantown, WV
    MS-Off Ver
    Excel 2007
    Posts
    54

    Date formula - Change Format to YYYYMMDD from Exported Format

    I am requesting assistance on changing changing date/time format (i.e 0007-10-12T00:00:00.000) to YYYYMMDD (20071012) format in my Excel attachment.

    Instructions are clear and I used visuals to describe my request.

    Thank you.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Date formula - Change Format to YYYYMMDD from Exported Format

    I guess this might work?
    =SUBSTITUTE("2"&MID(B2,2,9),"-","")

  3. #3
    Registered User
    Join Date
    07-28-2012
    Location
    Morgantown, WV
    MS-Off Ver
    Excel 2007
    Posts
    54

    Re: Date formula - Change Format to YYYYMMDD from Exported Format

    ragulduy,

    Thank you so much for the formula! It worked for rows 2 to 7 because the year was in 2000s but it did not work for rows 8 to 12 because it is in the year 1900s. for the 1900s I revised your formula too =SUBSTITUTE("19"&MID(B9,3,8),"-","") .


    Is there a way to merge formulas =SUBSTITUTE("2"&MID(B2,2,9),"-","") and =SUBSTITUTE("19"&MID(B9,3,8),"-","") together?

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

    Re: Date formula - Change Format to YYYYMMDD from Exported Format

    Select the column, goto Data>Text to columns..., selected Fixed widt.

    Put a break points before the 3rd character and before the 'T'.

    On the next step choose not to import the first and third columns and set the column data format for the 2nd column to YMD.

    Click Finish.

    You should now have 'real' dates which can be formatted however you like.
    If posting code please use code tags, see here.

  5. #5
    Registered User
    Join Date
    07-28-2012
    Location
    Morgantown, WV
    MS-Off Ver
    Excel 2007
    Posts
    54

    Re: Date formula - Change Format to YYYYMMDD from Exported Format

    Norie,

    Got it, thank you very much.

+ 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. Changing yyyymmdd date format
    By bill22 in forum Excel General
    Replies: 4
    Last Post: 11-24-2014, 03:02 AM
  2. Need a formula for this format YYYYMMDD-YYYYMMDD (20130801-20130831)
    By Infoway123 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-24-2013, 02:25 PM
  3. =now() Date Function, I format to YYYYMMDD, Want that value...
    By AdamParker in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-17-2008, 07:08 PM
  4. [SOLVED] How do you change a date that is in the yyyymmdd format to mmddyy
    By Norton in forum Excel General
    Replies: 2
    Last Post: 03-08-2006, 11:20 AM
  5. [SOLVED] Need macro to change date from yyyymmdd format to mm/dd/yyyy forma
    By Iris in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-16-2005, 06:35 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