Hi Wallaa, I think I have to explain a little more. In the database these records are stored in a datetime-value. I mean the time is also set to the moment I store the data. ie Record A has 2009-11-18 15:44:10 as a value and record B 2009-11-18 14:00:00.
The problem I'm facing I want to sort on just the datepart and no check on the time value. Now when I use a descending sort. Record A is the top record, which is correct, but in my sorting clause I have some other fields which should also be used to sort.
Say Record A also has a field Type which is set to 2 and the value for Record B for the Type field is set to 1.
the result I would like to have in this case is record B as first record because the typefield is 1 the record A because the typefield is 2.
When I first sort on the datefield desc then sort on the type-field asc. Record A is the top record. Which makes sense because the timevalue 15:44:10 is higher then the time value for record B 14:00:00.
If I could just sort on the date (2009-11-18 without the time-part) descending then sort on the typefield, everything would be as I want to have it.
Or is there a way to set the timevalue to 12:00:00 before sorting, so every record has the same time in de datetime-part.
I hope this explains a little better what I try to achieve here.
To be more clear, I don't get any errors, just want to know how I could do this.