Results 1 to 3 of 3

Converting date from various forms to mm/dd/yyyy format

Threaded View

  1. #1
    Registered User
    Join Date
    11-22-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    2

    Converting date from various forms to mm/dd/yyyy format

    Hi, guys, I am trying to convert the data in a column, "N" which is an output of another macro into mm/dd/yyyy format.

    Below are the steps I am trying to perform:

    1. Cell will have data in the format: 'some special characters' <space> 'Date' <space> 'timestamp or some string'
    2. I have to get the 'Date' thats in the middle and convert it into "mm/dd/yyyy" format.
    3. Input Dates can be of the below formats;
    dd/mm/yyyy
    dd/mm/yy or mm/dd/yy
    d/m/yy or m/d/yy
    And finally similar dates but instead of '/' we might have "-" or "."

    I had written a macro which is as below:
    I had taken string length instead of truncating with <space> which gave me errors.
    For example:




    Input Date Output Date
    1/7/10 1/7/2010
    1/7/2010 1/7/2010
    1/7/2010 1/7/2010
    1/7/2010 1/7/2010
    20/07/11 11/15/42
    Upda 07/20/11 1
    1/7/2010 1/7/2010
    1/7/2010 1/7/2010
    1/7/2010 1/7/2010
    7/12/2010 12/7/2010
    7/12/2010 12/7/2010

    Suggestions please.
    Last edited by Sud; 03-20-2012 at 11:40 PM.

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