| Author |
Message |
DDSJ
Newbie
Joined: 18 Aug 2021
Online Status: Offline
Posts: 12
|

Topic: Sorting of datetime field is not working Posted: 05 Sep 2022 at 4:18am |
|
I have a datetime field in report which have time values (ascending order) like :
00:01:00,07:00:00, 13:01:00, 14:00:19
I have applied the ascending sorting in the report using record sort on this field but records are displayed in below manner:
07:00:00, 13:01:00, 14:00:19,00:01:00
The 00:01:00 value field is always displayed in last instead of first place.
Do not know why this is happening.
Please help.
Thanks
|
IP Logged |
|
|
|
lockwelle
Moderator
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
|

Posted: 06 Sep 2022 at 5:27pm |
|
DateTime sorting is not as straight forward as you would think.
I always build a group, then I can go into the grouping properties, and for DateTime you need to specify if it is by the day, the week, and a couple of other ways.
Try them out. Most likely it is set for By Week, which I think is the default.
Hopefully, this will get you pointed in the right direction.
|
IP Logged |
|
kevlray
Admin Group
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
|

Posted: 07 Sep 2022 at 4:25am |
|
The other way is to use formulas and break out the time parts and do sorting/grouping by them. i.e., left(cstr({datetimefield}),2) to get the hours.
|
IP Logged |
|
|
|