View Single Post
  #10 (permalink)  
Old September 3rd, 2009, 05:59 PM
Old Pedant Old Pedant is offline
Friend of Wrox
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,652
Thanks: 3
Thanked 141 Times in 140 Posts

To change the format, you have to specify custom binding with <%#...%> tags. I'm not really an ASP.NET person, so I'm hesitant to try to lead you here.

Ohh...and the problem is that you aren't using a "strongly typed dataset" so indeed you must *CAST* the Object (which is what r{"xxx"] gives you...a generic Object) to the proper type.

So *probably* just
    DateTime dt = (DateTime) r["First_Resurvey_Date"];
But not a C# person, either (Java and C++), so you might have to use an explicit convert function.