Displaying a UTC date-time from DB in local-time in a GridView

Discussion in 'ASP .Net' started by Kevin Frey, Nov 30, 2006.

  1. Kevin Frey

    Kevin Frey Guest

    Our database stores all date-time values in UTC format. When I display this
    data in a GridView (using a HyperLinkField) I'd like to display the
    equivalent local-time instead.

    It seems to me that this would have been trivially easy if there was a
    formatting string that would make the conversion prior to formatting. But
    alas there appears to be no such capability.

    Without this approach, I'm not sure where I would inject the "ToLocalTime"
    conversion.

    Can anyone suggest how to do this?
     
    Kevin Frey, Nov 30, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?aGVuaw==?=

    Covert UTC String to UTC Datetime

    =?Utf-8?B?aGVuaw==?=, May 7, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    18,815
    Egbert Nierop \(MVP for IIS\)
    May 7, 2006
  2. Replies:
    1
    Views:
    831
    Paul Boddie
    Mar 11, 2007
  3. deepak
    Replies:
    1
    Views:
    30,817
    Kevin Spencer
    Feb 6, 2008
  4. Jonathan Wood
    Replies:
    1
    Views:
    2,233
    Jonathan Wood
    Nov 1, 2009
  5. UTC date and time to local

    , Apr 9, 2006, in forum: Javascript
    Replies:
    13
    Views:
    221
    Dr John Stockton
    Apr 13, 2006
Loading...

Share This Page