Home » Asp.net

add column to gridview to convert date

can I add a column to gridview that will convert the utc date to my local time?  HOw? 


2 Answers Found


Answer 1

This converts the utc  time to pacific time  but not central time...which is my time....???

<asp:TemplateField HeaderText="My time">



Answer 2

you can apply TimeZoneInfo to convert  from utc  to your local  time 'CST'

the documentation has an example: http://msdn.microsoft.com/en-us/library/system.timezoneinfo.converttimefromutc.aspx



<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure