Posted on: 10/15/2013 7:45:53 PM | Views : 682

I switched the code handling datetime from local to UTC.  It works well for all new dates added to SQL Server 2005 database.  It properly displays the UTC time converted to local no matter where the client is located - unless it is displaying legacy dates.  Oops, forgot to consider legacy dates.  As you can imagine, they are not correct.  Research indicates that the DateTimeKind property/method/whatever will reveal the DateTime.kind: UTC, Unspecified, or Local.  My problem is that new dates that are known to be UTC are rendering on the page as "Unspecified".
Dim k As DateTimeKind = CDate(row.Item(j)).Kind Select Case k Case DateTimeKind.Utc Response.Write("UTC") Case DateTimeKind.Unspecified Response.Write("Unspecified") Case DateTimeKind.Local Response.Write("Local") Case Else Response.Write(& ...

Go to the complete details ...