Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Displaying a UTC date-time from DB in local-time in a GridView

Reply
Thread Tools

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

 
 
Kevin Frey
Guest
Posts: n/a
 
      11-30-2006
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?


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How a UTC stored date column in a gridview, displays in localtime? Savvoulidis Iordanis ASP .Net 1 08-24-2009 02:56 PM
Covert UTC String to UTC Datetime =?Utf-8?B?aGVuaw==?= ASP .Net 3 05-07-2006 06:25 PM
Cast from string "Thu Jul 21 00:00:00 UTC+0100 200" to type 'Date'is not valid(System.InvalidCastException) Kiran ASP .Net 1 08-04-2005 10:01 AM
Getting local client UTC offset Buddy Ackerman ASP .Net 0 05-11-2005 08:42 PM
How can I control UTC offset? Maxim S. Lee ASP .Net 1 10-27-2004 05:47 PM



Advertisments