| re: date sort in Access 97
Tim,
Use the CDate() function to convert the text field to something Access
recognizes as a date. In other words, instead of sorting on the [Field1]
field, you need to sort on CDate([Field1]).
-Todd Matson
"Tim Lang" <timl@ecmadison.com> wrote in message
news:a88f8822.0404131207.4e1e13ed@posting.google.c om...[color=blue]
> I'm trying to sort results of a query of a number of fields from two
> tables by a date field in one of them. However, it keeps sorting the
> date based only on the first number ("day") of the date (ex. 1/1/2004,
> 2/1/2003, 3/1/2004...) and not the month or year. Is there a special
> function I need to try?
>
> Note: I noticed that the data type of the field storing the date is
> "text" and not "date/time." This table is part of a proprietary
> database so I can't go in and modify the data type. I have a feeling
> this is what is causing the problem but since I'm a beginner I'm not
> entirely sure.
>
> any ideas? thanks,
> Tim[/color] |