Date format without time in ASP.NET Gridview

DataFormatString is a property of BoundField control and doesn’t affect any other control. You can specify the format in an Eval expression:

Text="<%# Eval("Fromdate", "{0:dd/MM/yyyy}") %>" />

Leave a Comment