Re: Databinding Dates in ASP .Net 2.0



So since the SqlDateTime is not supported in a dataset, you basically
can't do this if your objectdatasource is using a dataset.  Is that
correct?

Why do you say that? It works fine for me. It probabaly doesn't display exactly how you'd like when it's null, since that's exactly what it does display: "Null". The other idea it to either create your own class to hold the DateTime and override ToString() returning the empoty string when null, or handle the GridView's (or DataGrid's) RowDataBound (or ItemDataBound) and then going into the cell that has the null value and changing it to contain an empty string when the DateTime is null.


-Brock
DevelopMentor
http://staff.develop.com/ballen




.



Relevant Pages

  • Re: hour separator from . to : ?!?!
    ... If you are using the SQL Server ODBC driver, and you are using the driver to ... convert from DATETIME to string, ... > front end to display it however they wish. ...
    (microsoft.public.sqlserver.odbc)
  • Re: hour separator from . to : ?!?!
    ... If you are using the SQL Server ODBC driver, and you are using the driver to ... convert from DATETIME to string, ... > front end to display it however they wish. ...
    (microsoft.public.sqlserver.setup)
  • RE: DataGrid with date column that is sometimes blank
    ... As for the displaying DateTime value in DataGRid ... currently using BoundColunn to display data? ... Template Column in which we can use databind statement to embeded our ... according to the dateTime value's Ticks: ...
    (microsoft.public.dotnet.framework.aspnet.datagridcontrol)
  • Re: Count Time hours, minutes, seconds
    ... are not typing the keyboard. ... thermometer bar except it would be a digital display showing time. ... you can use the DATETIME() function. ... into the memo field in order to keep track of how long they are ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Processing DateTime data
    ... Store and display all as GMT, in both locations, or store the timezone ... > display the resulting datetime accordingly as will the handheld. ...
    (microsoft.public.dotnet.framework.compactframework)