+ Reply to Thread
Results 1 to 6 of 6

Text To Date

  1. #1
    Registered User
    Join Date
    03-18-2014
    Location
    Pakistan
    MS-Off Ver
    2007
    Posts
    24

    Text To Date

    Hi,
    Requesting to help me out with the date issue as below:
    I have dates in following form:
    020513 which appears in excel as 20513
    100513 which appears in excel as 100513
    Now when i try to convert this general number into date using text to columns it returns result in this format:
    020513 <text to columns> <result> 20-05-13, but infact it should have been 02-05-13.
    100513 BUT THIS VALUE RETURNS CORRECT DATE ie 10-05-13
    I understand that in first value excel does not counts 02 but it counts 20 from 05 and returns the value as 20
    So is there any solution to this
    Please reply... very needy
    Attached Images Attached Images

  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: Text To Date

    In 020513 which is the day & month?


    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
    Registered User
    Join Date
    03-18-2014
    Location
    Pakistan
    MS-Off Ver
    2007
    Posts
    24

    Re: Text To Date

    02 date
    05 Month
    2014 Year

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

    Re: Text To Date

    In A1 Cell

    20513

    In B1 Cell

    Will result text Date

    =TEXT(TEXT(LEFT(A1,LEN(A1)-2),"00-00-")&RIGHT(A1,2),"DD-MM-YYYY")

    To get real date, just add a Value() function in front of it like this...

    =VALUE(TEXT(TEXT(LEFT(A1,LEN(A1)-2),"00-00-")&RIGHT(A1,2),"DD-MM-YYYY"))

    Format it as date

  5. #5
    Registered User
    Join Date
    03-18-2014
    Location
    Pakistan
    MS-Off Ver
    2007
    Posts
    24

    Re: Text To Date

    Thanks Sixth Sense
    but is it possible via this formula:"=TEXT(A1, "00-00-00")"

    What i did that inserted "=TEXT(A1, "00-00-00")" in B1

    and then in C1 i inserted
    =DATEVALUE(B1)

    But your second formula saves me 01 column :-)

    Now just for my information, is it possible to add B1 formula and C1 formula together in same column?
    =TEXT(A1, "00-00-00") + =DATEVALUE(B1)

    Also can you explain what is happening in your below formula!
    =VALUE(TEXT(TEXT(LEFT(A1,LEN(A1)-2),"00-00-")&RIGHT(A1,2),"DD-MM-YYYY"))

    Shall be grateful for your time

  6. #6
    Registered User
    Join Date
    03-18-2014
    Location
    Pakistan
    MS-Off Ver
    2007
    Posts
    24

    Re: Text To Date

    Ahh Forgot!!

    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. How to update Text Box2 with date 14 days after selected date in Text box1...
    By mjc61 in forum Access Programming / VBA / Macros
    Replies: 6
    Last Post: 01-26-2014, 09:17 PM
  2. Replies: 5
    Last Post: 09-24-2013, 02:40 PM
  3. Adding one TextBox with weeks to text box with date to give final Date
    By davidloops in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-21-2013, 08:25 PM
  4. Replies: 1
    Last Post: 02-14-2013, 10:40 PM
  5. [SOLVED] Keep Date in Date Text Format not Date Value
    By wonderfulle in forum Excel General
    Replies: 2
    Last Post: 08-10-2010, 07:44 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