Time & DataGrid
Database
2
Posts
2
Posters
0
Views
1
Watching
-
Grid only views Date part of a datetime objects(Fields) ...is there any mean to view the time part only or even both date and time. thanx Mr.Cooper
This probably belongs in the ASP.NET forum, but I'll take a stab at it anyway. I think you need to set the
DataFormatString
property of the appropriateBoundColumn
object. Try, for example, setting it to{0:t}
or{0:g}
. For more date/time formatting options, see Standard DateTime Format Strings[^] and Custom DateTime Format Strings[^] in the .NET Framework documentation. Stability. What an interesting concept. -- Chris Maunder