Hi I created a report using fetchXML which includes date range (refer to image 3).
when sorting the report by the date column (image 3) the records are sorted by the day rather than shorted based on year, month and day.
It is shorting by day only. how i can short it properly (in year, month and day order) and display the date in dd/MM/yyyy format.
Here you can see what is happening:
Ascending order - image 1

Descending order - image 2

image 3 - fetchXml used:
{% fetchxml employeeBookings %}
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="msft_employeebooking">
<attribute name="msft_areaid" />
<order attribute="msft_bookingdate" descending="true" />
<order attribute="msft_employeeid" descending="false" />
<filter type="and">
<condition attribute="statecode" operator="eq" value="0" />
<condition attribute="msft_employeebookingid" operator="not-null" />
<condition attribute="msft_bookingdate" operator="on-or-before" value="{{now | date_add_days: 7 | date: "yyyy-MM-dd" }}" />
<condition attribute="msft_bookingdate" operator="on-or-after" value="{{now | date_add_days: -49 | date: "yyyy-MM-dd" }}" />
display the record:
<th>{% include 'snippet' snippet_name:'Report - Booking date' %}</th>
</tr>
</thead>
<tbody>
{% for empBooking in employeeBookings.results.entities %}
<tr>
<td>{{ empBooking.fullname }}</td>
{% if lang == "English" %}
<td>{{ empBooking['facGr.msft_name'] }}</td>
<td>{{ empBooking.msft_bookingdate | date: 'dd/MM/yyyy' }} </td>
Thank you,
Siva