You could look at creating another attribute that stores the sort order, so when you display the list you can order it by this attribute.
Maybe the easiest way to do this would be to create a new DateTime value with a common date and just copy the time from your existing object to it. Something like this...
parseDateTime('2022-01-01 ' + formatDateTime($object/Date1,'HH:mm:ss'), 'yyyy-MM-dd HH:mm:ss')
Hope this helps.
Hi,
Please separate date & time fields then you can sort it easyly.
https://docs.mendix.com/refguide7/parse-and-format-date-function-calls/
Thanks & Regards
Hi,
Please separate date & time fields then you can sort it easyly.
https://docs.mendix.com/refguide7/parse-and-format-date-function-calls/
Thanks & Regards
One of the ways could be to break down the dateTime to date and time separately, sort by time, then by date and put it back together in descending order.
Have you already tried the formatTime function?
Parse and Format Date Function Calls | Mendix Documentation
Hi Nathan,
Solution could be update datetime of all associated doses on entering new dose everytime.
Please mark answer as Accepted, it helps :)
If the time component is only relevant in your data; just use integers for hours and minutes separately
Sorting is way more easier, no timezone related issues and displaying can be done using a text widget (1):{2}
{1} Hours
{2} Minutes