Hello,
PLease go through below link:
http://hamidseta.blogspot.in/2011/06/datetime-format-in-gridview.html[
^]
http://www.aspdotnet-suresh.com/2011/05/how-to-set-date-format-in-gridview.html[
^]
For you requirement, it will be like below:
<asp:boundfield datafield="Date" dataformatstring="{0:g}" headertext="CalendarDate" readonly="True" > </asp:boundfield><br />
From SQL Server, point of view, try below query while fetching the date:
SELECT CONVERT(VARCHAR,GETDATE(),101) + RIGHT (CONVERT(VARCHAR,GETDATE() , 100 ) ,7)
Result will be like :
MM/dd/yyyy HH:mm AM/PM.