+ Reply to Thread
Results 1 to 5 of 5

Convert Textstring Date to Value Date - Appreciate your help!

  1. #1
    Forum Contributor
    Join Date
    10-22-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    114

    Convert Textstring Date to Value Date - Appreciate your help!

    Hi - I have some text dates like: 8/19 ; 8/16; 8/6 in 2 columns. I want convert them to 08/19/13; 08/16/13; 08/06/13.
    The problem I have after converting them is that they are all text dates. I tried Datevalue(xxxx), but it doesn't work.
    Below is my code:

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Convert Textstring Date to Value Date - Appreciate your help!

    Hello Xceller,

    Let VBA do the conversion for you by declaring a variable as Date Type.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: Convert Textstring Date to Value Date - Appreciate your help!

    Quote Originally Posted by Leith Ross View Post
    Hello Xceller,

    Let VBA do the conversion for you by declaring a variable as Date Type.
    Very nice Leith

  4. #4
    Forum Contributor
    Join Date
    10-22-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    114

    Re: Convert Textstring Date to Value Date - Appreciate your help!

    Hi Leith Ross - Appreciate your looking into this. It is very stubborn. They still show as text dates after running your code. I attached a small sample of the workbook. Can you take a look.
    Attached Files Attached Files
    Last edited by Xceller; 09-19-2013 at 07:48 PM.

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Convert Textstring Date to Value Date - Appreciate your help!

    Hello Xceller,

    The macro worked for me. I too am using Office 2010. Here is variation that might do it. Setting the cell's formula property, instead of the value, should force the cell format from text to a date.
    Please Login or Register  to view this content.

+ 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. convert calendar date ddmmyy to julian date yyyydd
    By imichalopo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-13-2015, 01:47 AM
  2. Convert Long Written Excel Date to Proper Date
    By DavidMichaelangelo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-19-2013, 04:47 PM
  3. Formula to convert text to a date in a date format
    By mikeburg in forum Excel General
    Replies: 5
    Last Post: 08-24-2011, 09:15 AM
  4. Replies: 1
    Last Post: 03-31-2010, 05:03 PM
  5. Convert a julian gregorian date code into a regular date
    By Robert in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-13-2006, 02:10 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