I have Crystal Reports 8.0 and I think this is a simple fix. When I sort my date field it sorts by month instead the entire date. For example, 1/5/06 comes before 3/19/04. I want earliest date to most recent date.
Then it's not a date field, or you've specifically asked it to sort by month only, I'll asssume the first.
Just because data appears to be a specific data type doesn't mean that it is, it' up to you as the developer to understand data types and convert them when required.
If you right click the field and select browse data, it will tell you the data type. If it says string, then it's a string which houses a mask of a date, it is NOT a date.
So create a formula of:
cdate({table.date}) and sort by it.
btw, when you sort a string it sorts by the order of the characters within, hence your mistaken assumption that it is sorting by month, it is not, you'll see that October will follow January as they both start with a 1.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.