+ Reply to Thread
Results 1 to 23 of 23

Data set needs date conversion

  1. #1
    Registered User
    Join Date
    06-05-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    56

    Data set needs date conversion

    Hi, I have two stock CSV files that need the date coverted to match a third date format for the purposes of being able to feed them into a software. I am looking for a way to automatically change the date formats of the CSV files I have to the specified date format required.

    The first column is the only one that needs changing as it is the one with the date

    The desired date format is YYYY.MM.DD
    (Year.Month.Day)
    eg) 2008.03.18
    2008.03.19
    2008.03.20
    and so on

    --------------------------------------------------------------------


    One one of the spreadsheets that need changing my current date format is
    01/02/1897
    01/04/1897
    01/05/1897
    MM/DD/YYYY
    (Month/Day/Year)

    ex) this would need to be changed to 1897.01.02 etc
    --------------------------------------------------------------------

    The other spreedsheet's current date format is
    2/7/1885
    2/8/1885
    2/9/1885
    MM/DD/YYYY
    (Moth/Day/Year)

    ex)this would need to be changed to 1885.02.07

    *note* In this data, when months or days are single digits there is no zero currently placed before them. This would need to be corrected as I have done with the above example.
    Last edited by wowzers; 06-28-2013 at 12:52 AM. Reason: Added files

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Data set needs date conversion

    Change the control panel Date setting to your desired format and try...


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Contributor
    Join Date
    08-02-2012
    Location
    Pune
    MS-Off Ver
    Office 365 (Win 10)
    Posts
    489

    Re: Data set needs date conversion

    Will this work?
    PHP Code: 
    =TEXT(A1,"YYYY-MM-DD"
    Please make the Post as solved, when you get your answer & Click * if you like my suggestion

  4. #4
    Registered User
    Join Date
    06-05-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Data set needs date conversion

    Quote Originally Posted by :) Sixthsense :) View Post
    Change the control panel Date setting to your desired format and try...
    Hi, this is a good idea but my rquired date is not in the list of excels formats to pick from

  5. #5
    Registered User
    Join Date
    06-05-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Data set needs date conversion

    Quote Originally Posted by akhileshgs View Post
    Will this work?
    PHP Code: 
    =TEXT(A1,"YYYY-MM-DD"
    Hi, I get an error message when attempting this

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Data set needs date conversion

    In short date format of your control panel Regional Date and Time Setting just enter the format you would like (Ex. DD-MM-YY or MMM-DDD-YYY)

  7. #7
    Registered User
    Join Date
    06-05-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Data set needs date conversion

    Quote Originally Posted by :) Sixthsense :) View Post
    In short date format of your control panel Regional Date and Time Setting just enter the format you would like (Ex. DD-MM-YY or MMM-DDD-YYY)
    how do i do that?

  8. #8
    Registered User
    Join Date
    06-05-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Data set needs date conversion

    Quote Originally Posted by :) Sixthsense :) View Post
    In short date format of your control panel Regional Date and Time Setting just enter the format you would like (Ex. DD-MM-YY or MMM-DDD-YYY)
    I figured out how to do this but it does not work.

  9. #9
    Registered User
    Join Date
    06-05-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Data set needs date conversion

    I have attached copies of the files here so that it may be easier to solve this dilemna.
    Please note the actual files are way to big to upload so I have attached a sample.

  10. #10
    Registered User
    Join Date
    06-05-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Data set needs date conversion

    Bumping this so that someone can help me

  11. #11
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Data set needs date conversion

    In A1 Cell

    01/02/1897

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


    Copy and paste this formula in H1 Cell and drag it down...

    Use paste special to convert the formula to values.

  12. #12
    Registered User
    Join Date
    06-05-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Data set needs date conversion

    Quote Originally Posted by :) Sixthsense :) View Post
    In A1 Cell

    01/02/1897

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


    Copy and paste this formula in H1 Cell and drag it down...

    Use paste special to convert the formula to values.
    Thank you sixthsense.
    This formula works on only one of my spreadsheets and its not giving me the date I am looking for. (its givig me YYYY.DD.MM when I am actually looking for YYYY.MM.DD)

    Nontheless its a step in the right direction

  13. #13
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Data set needs date conversion

    Quote Originally Posted by wowzers View Post
    its givig me YYYY.DD.MM when I am actually looking for YYYY.MM.DD)
    Just interchange it...
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    06-05-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Data set needs date conversion

    Quote Originally Posted by :) Sixthsense :) View Post
    Just interchange it...
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thankyou kinldly, that worked beautifully

    I must ask you, is there a similar formula that can be made for the second spreadsheet?

    The other spreedsheet's current date format is
    2/7/1885
    2/8/1885
    2/9/1885
    MM/DD/YYYY
    (Month/Day/Year)

    ex)this would need to be changed to 1885.02.07

    *note* In this data, when months or days are single digits there is no zero currently placed before them. This would need to be corrected as I have done with the above example.

  15. #15
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Data set needs date conversion

    In A1 Cell
    2/7/1885

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

  16. #16
    Registered User
    Join Date
    06-05-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Data set needs date conversion

    Quote Originally Posted by :) Sixthsense :) View Post
    In A1 Cell
    2/7/1885

    In H1 Cell
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thankyou sixthsense
    This does exactly what I need except there is one problem: the year needs to be in YYYY format (four digits)

  17. #17
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Data set needs date conversion

    Can you please show an example in which the suggested formula fails for better understanding

  18. #18
    Registered User
    Join Date
    06-05-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Data set needs date conversion

    Quote Originally Posted by :) Sixthsense :) View Post
    Can you please show an example in which the suggested formula fails for better understanding
    Sixthsense,

    when using the formula my date is converted from

    2/17/1885
    to
    85 .02.17

    The converted date returned from that formula is 85 with two spaces after it then .02.17

    the correct date I require would need to have the full four dijits of the year

    correct date is 1885.02.17

    Thank you kindly

  19. #19
    Registered User
    Join Date
    06-05-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Data set needs date conversion

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


    Can anyone please help correct this so the years returned show up as four digits?

  20. #20
    Registered User
    Join Date
    06-05-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Data set needs date conversion

    Bump post so this can be completed hopefully

  21. #21
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Data set needs date conversion

    Try this...

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

  22. #22
    Registered User
    Join Date
    06-05-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Data set needs date conversion

    Quote Originally Posted by :) Sixthsense :) View Post
    Try this...

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thank you sixthsense. This worked!

  23. #23
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Data set needs date conversion

    Glad it helps you and thanks for the feedback

+ 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