+ Reply to Thread
Results 1 to 6 of 6

Need Formula/VBA Code to convert date in String Format to Normal Date format

  1. #1
    Registered User
    Join Date
    12-10-2011
    Location
    Chennai
    MS-Off Ver
    Excel 2007
    Posts
    56

    Need Formula/VBA Code to convert date in String Format to Normal Date format

    Hi All,

    I have a Column of cells with date mentioned in the following format Sep 8,2010. Is it possible to convert them into following format - 2010-09-08

  2. #2
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Need Formula/VBA Code to convert date in String Format to Normal Date format

    Hi Karthiik, try this

    Select the data, press CTRL+H to activate the Find/replace

    In 'Find what' box enter a comma, then 'replace with' box a comma with space. Then click Replace All

    Change the cell format to Custom as , yyyy-mm-dd
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  3. #3
    Registered User
    Join Date
    12-10-2011
    Location
    Chennai
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Need Formula/VBA Code to convert date in String Format to Normal Date format

    I have tried it, but the format is not getting changed. Does excel automatically recognize Sep as 08

  4. #4
    Registered User
    Join Date
    12-10-2011
    Location
    Chennai
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Need Formula/VBA Code to convert date in String Format to Normal Date format

    Actually not 08. its - 09 (September)

  5. #5
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Need Formula/VBA Code to convert date in String Format to Normal Date format

    You need to specify the format. Select the data & right click, click on 'Format Cells'

    On the first tab 'Number' down under 'Category' select "Custom"

    Right side white box under 'Type' enter yyyy-mm-dd

    Click OK

  6. #6
    Registered User
    Join Date
    12-10-2011
    Location
    Chennai
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Need Formula/VBA Code to convert date in String Format to Normal Date format

    Hi Haseeb,

    I have tried it but the format is not getting changed...

+ 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