Display DateTime in GridView using user's time
- by Rachel Martin
I have a DateTime stored in UTC time that I'd like to display to the user in their local time from within a GridView control. How can I convert my DateTime to the user's time (not my server's local time)? Here is my current field as it appears in the GridView Columns collection:
<asp:BoundField DataField="RunTime" HeaderText="Run Time"
SortExpression="RunTime" DataFormatString="{0:f}" />