Define date and time format used by DateTime

2

I have an application where it has record time, which uses DateTime.Now , and a start date and end date that the user informs. Showing this data in a DataGrid is in MM/dd/yyyy hh:mm tt format. I want it to be shown in the Brazilian standard dd / MM / yyyy hh: mm. How can I set this to DateTime ?

DataGrid:

    
asked by anonymous 09.09.2015 / 18:35

2 answers

4

You need to format the column this way:

<DataGridTextColumn Binding="{Binding DataInicio, StringFormat=\{0:dd.MM.yy HH:mm\}}" />
    
09.09.2015 / 18:47
2

Try:

 DataFormatString="{0:dd/MM/yyyy HH:mm}"
    
09.09.2015 / 18:47