WPF/C# - Applying date format to listview

前端 未结 1 1420
隐瞒了意图╮
隐瞒了意图╮ 2020-12-31 02:29

I have a listview bound to a collection of objects. One of the properties is a DateTime object named startDate. It\'s displayed in the standard 1/1/2001 1:00:00 PM format

相关标签:
1条回答
  • 2020-12-31 03:01

    Simple change the StringFormat in your binding.

    DisplayMemberBinding="{Binding Path=startDate, StringFormat='yyyy-MM-dd HH:mm:ss.fff'}"
    
    0 讨论(0)
提交回复
热议问题