+ Reply to Thread
Results 1 to 15 of 15

convert to date

  1. #1
    Forum Contributor nasser's Avatar
    Join Date
    12-29-2006
    Location
    Kuwait
    MS-Off Ver
    2010-2013-2016
    Posts
    216

    convert to date

    hi all , first I'm trying to convert an unknown cell format , to date (H:H) but i have to double click (edit then leave) each cell to convert to date...
    and second, I used the ( &) sing to get 2 cells together , it working , but when i make sort it not sorting correct , so i think it needs to be converted to some format too
    thank you
    Attached Files Attached Files
    Last edited by nasser; 03-04-2009 at 05:49 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: convert to date

    To convert the column to true dates, select the column and go to Data|Text to Columns... then skip to the third window and select Date in the Column Data Format area and select DMY from the adjacent drop down menu.

    Click Finish.

    Now I am not sure what exactly you mean with the sort question... can you elaborate?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988

    Re: convert to date

    Select the column > Text to column > at wizard stage 3 select date

    What order are you expecting in the sort

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  4. #4
    Forum Contributor GuruWannaB's Avatar
    Join Date
    01-24-2008
    Location
    An hour due East of Cowtown Ohio
    MS-Off Ver
    2010
    Posts
    421

    Angry Re: convert to date

    **Removed...
    Last edited by GuruWannaB; 03-04-2009 at 05:35 PM.
    I help because of the Pavlovian dog that resides in the inner me...so if you are happy with the results, please add to my reputation. It helps keep me motivated!



    Please mark your threads as Solved once it is solved. Check the FAQ's to see how.

  5. #5
    Forum Contributor nasser's Avatar
    Join Date
    12-29-2006
    Location
    Kuwait
    MS-Off Ver
    2010-2013-2016
    Posts
    216

    Re: convert to date

    Quote Originally Posted by VBA Noob View Post
    Select the column > Text to column > at wizard stage 3 select date

    What order are you expecting in the sort

    VBA Noob
    Thank u the date tips was so right and worked with me , about the sorting NOT to be like
    11305/60
    11306/10
    11306/11
    11306/12
    11306/13
    11306/14
    11306/15
    11306/16
    11306/17
    11306/18
    11306/19
    11306/20
    11306/21
    11306/9
    so i think that 11306/9 ( the last entry have to be in the top of 11306/10

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: convert to date

    Change the Format in Column B to Numbers: Select column B and go to Data|Text to Columns and just click Finish.

    Then Sort by Column D and then by Column B within same Sort

  7. #7
    Forum Contributor nasser's Avatar
    Join Date
    12-29-2006
    Location
    Kuwait
    MS-Off Ver
    2010-2013-2016
    Posts
    216

    Re: convert to date

    Quote Originally Posted by NBVC View Post
    Change the Format in Column B to Numbers: Select column B and go to Data|Text to Columns and just click Finish.

    Then Sort by Column D and then by Column B within same Sort
    thanks man that succefuly help and solved it
    have a great time thanks again

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: convert to date

    or use
    =D2&"/"&CHOOSE(LEN(B2),"000","00","0","")&B2
    which also gets rid of column E
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: convert to date

    Or if you want that format and get rid of column E...then

    =D1&"/"&TEXT(B1,"0000")

    or

    =D1&TEXT(B1,"\/0000")

    then sort by this new column E.

    should work.

  10. #10
    Forum Contributor nasser's Avatar
    Join Date
    12-29-2006
    Location
    Kuwait
    MS-Off Ver
    2010-2013-2016
    Posts
    216

    Re: convert to date

    for the last 2 replies i recieve this error in the attachment
    Attached Images Attached Images

  11. #11
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: convert to date

    See attached...

    Can't see in your .jpg if you actually used single or double quotes....
    Attached Files Attached Files

  12. #12
    Forum Contributor nasser's Avatar
    Join Date
    12-29-2006
    Location
    Kuwait
    MS-Off Ver
    2010-2013-2016
    Posts
    216

    Re: convert to date

    Quote Originally Posted by NBVC View Post
    See attached...

    Can't see in your .jpg if you actually used single or double quotes....
    i took it as a copy and paste in the formula bar it not worked so i made it single quotes but also not worked , but i c it worked in the file that u sent to me
    thank u so much

  13. #13
    Forum Contributor nasser's Avatar
    Join Date
    12-29-2006
    Location
    Kuwait
    MS-Off Ver
    2010-2013-2016
    Posts
    216

    Re: convert to date

    thank u all guys for ur help .. best wishes and Good night

  14. #14
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: convert to date

    I bet it is the version your on

    Try instead:

    =D1&"/"&TEXT(B1;"0000")

    Some versions of Excel you need ; to separate arguments, while other more popular versions need the comma.

  15. #15
    Forum Contributor nasser's Avatar
    Join Date
    12-29-2006
    Location
    Kuwait
    MS-Off Ver
    2010-2013-2016
    Posts
    216

    Re: convert to date

    Quote Originally Posted by NBVC View Post
    I bet it is the version your on

    Try instead:

    =D1&"/"&TEXT(B1;"0000")

    Some versions of Excel you need ; to separate arguments, while other more popular versions need the comma.
    yes NBVC .. the Comma was the problem and it working so well now , thanks alot for ur concern

+ 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