We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Blazor DataGrid (sFGrid) GridColumn Datetime Custom Formats


Could you please link the documentation on all avaliavle datatime formats to use in a data-grid column.


<GridColumn Field=@nameof(FMDowntimeFrmEntryS.EndTime) HeaderText="EndTime" Width="75" Format='MM/dd/yyyy HH:mm'></GridColumn>

In the example above the data and time is formatted correctly however it is in Zulu time (10/11/2022 14:40) which does not display times in AM or PM format. What is the correct format for the date output of 10/11/2022 2:40 PM?


3 Replies 1 reply marked as answer

NP Naveen Palanivel Syncfusion Team October 12, 2022 08:32 PM

Hi Mike,

  Greetings from Syncfusion support.

  Based on your query, you want to display times in AM or PM format to displayed in your grid. Your requirement can be achieved by using  the ` Format="MM/dd/yyyy hh:mm tt"`.

Please refer the below code example.

        <GridColumn Field=@nameof(Order.OrderDate) HeaderText="Order Date"  Format="MM/dd/yyyy hh:mm tt" TextAlign="TextAlign.Right" Width="130" Type="ColumnType.Date"></GridColumn>

        <GridColumn Field=@nameof(Order.Freight) HeaderText="Freight" Format="C2" TextAlign="TextAlign.Right" Width="120"></GridColumn>

Please get back to us for further details.




Marked as answer

MV Mike Vinson October 13, 2022 09:11 AM

Great, thank you Naveen!

NP Naveen Palanivel Syncfusion Team October 13, 2022 10:28 PM

Hi Mike,


Please get back to us if you need further assistance.


Naveen .

Live Chat Icon For mobile
Up arrow icon