• sort Data fields (Access2002)

    Author
    Topic
    #414460

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

    Viewing 1 reply thread
    Author
    Replies
    • #921195

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

      • #921209

        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.

      • #921210

        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.

      • #921211

        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

        • #921237

          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.

        • #921238

          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.

      • #921212

        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

    • #921196

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

    Viewing 1 reply thread
    Reply To: sort Data fields (Access2002)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: