How to format date column in DetailsList? #120
-
|
By default, the date column in a Fluent DetailsList show both date and time, how do I format the date so that it only show the date? Also, it seems that null date are being displayed as 12/31/1969, how do I make it show "blank"? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
|
Hi @kthirapatpibul,
Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
|
Hi @scottdurow, |
Beta Was this translation helpful? Give feedback.
-
|
Hey, keep in mind that the approach of @scottdurow is subjected to the delegation limit. Another approach I used is to have another column in the dataverse table that keeps track of the formatted date. Unfortunately, I was unable to use a calculated column for this due to limitation on the functions in this type of columns. So, the value should be updated manually, anytime the date changes, either by using a Power Automate flow (Premium) or by updating the value any time you change the original date column in your app. In the detailslist you would then reference this formatted column instead of your original date column and the query can be then delegated to dataverse. |
Beta Was this translation helpful? Give feedback.

Hi @kthirapatpibul,
You can use
AddColumns. E.g.Itemsproperty to include an additional column that formats your date:ItemsColSortByproperty to the original date so that you can sort by the real date field.Hope this helps!