Results 1 to 6 of 6
  1. #1
    5 Star Lounger
    Join Date
    Jan 2005
    Posts
    614
    Thanks
    0
    Thanked 0 Times in 0 Posts

    sort Data fields (Access2002)

    How do you sort Data fields that 1/2/2005 comes after 12/20/2004? Datatype is Text.

  2. #2
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: sort Data fields (Access2002)

    I would think that you need to change it to date/time datatype

  3. #3
    Star Lounger
    Join Date
    Jan 2003
    Location
    Manchester, Lancashire, England
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: sort Data fields (Access2002)

    Changing the data type is the best solution.

    If you really want to keep it as text you could parse out the year in a query with Right(YourData, 4) & then sort on the result. This would order on the year only.

  4. #4
    5 Star Lounger
    Join Date
    Jan 2005
    Posts
    614
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: sort Data fields (Access2002)

    I would love to but impossible task.
    There is Excel file that gets modified and I am pulling datat from this file and it is Text.
    Data is very abnormal as user gets to it easily, so I have to do it as simple as possible. all fields are text.
    Thanks

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: sort Data fields (Access2002)

    Create a query based on the table. Add a calculated column:

    RealDate: DateValue([TextDate])

    where TextDate is the name of the field that contains text values that look like dates. RealDate is the name of the calculated column, it can be anything. Sort on this column.

  6. #6
    5 Star Lounger
    Join Date
    Jan 2005
    Posts
    614
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: sort Data fields (Access2002)

    THANKS it does work!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •