web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Unanswered

shorting date only work as shorting by day instead of year, month and day format in dynamics 365 portal

(0) ShareShare
ReportReport
Posted on by 71

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

pastedimage1642441146589v5.png

Descending order - image 2

pastedimage1642441040242v3.png

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

  • SivaR Profile Picture
    71 on at

    i have resolved it.

  • Community Member Profile Picture
    on at

    Hi SivaR, 

    Glad your problem was solved, can you share the solution if possible?

    Thanks in advance!:)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Syed Aqib Raza Profile Picture

Syed Aqib Raza 42

#2
11manish Profile Picture

11manish 19 Super User 2026 Season 2

#2
Travis South Profile Picture

Travis South 19

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans