I have a datagrid with a datetime column. It shows both date and time but I only want the date. How can I achieve this?
Asked
Active
Viewed 345 times
-1
-
Can you show the column in the XAML please, so we can understand the bindings, and what have you tried so far. – Ryan Thomas Feb 07 '20 at 16:27
-
1use string format https://stackoverflow.com/q/5046429/366064 – Bizhan Feb 07 '20 at 16:30
-
It works, thanks Bizhan! – Mr-RandomQC Feb 07 '20 at 16:35
1 Answers
1
You can format the date "{Binding MyDateProperty, StringFormat=d}"
where it specifies that the datetime value be expressed as a date.

ΩmegaMan
- 29,542
- 12
- 100
- 122