A
AAJ
Hi
Does anyone know of any good publically available set of standards for
managing dates when dealing with a database server (in my case SQL Server
2000 and c# VS2005).
At the moment, if I create a record in the database for say a job, the
invoicedOn date field will be left null within the data base, not being
assigned untill its actually invoiced.
I can't figure out how to manipulate these date nulls within c#, for
instance displaying a list jobs with their invoiced date, should just
display formatted dates where they exist and be blank if not. This doesn't
seem to work for null dates when formatting is set on the datagrid. Same
goes if I try set a c# datetime field to null. What happens if I need to
remove a date, I can do this on the server, but I cant figure how to do this
in c#
A temporary measure has been to use isnull() in the server and choose a
really obviously incorrect date, but obviously this is a poor way of
handling things..
So what I'm looking for is a 'good practice' document of how to interact
between client and server with regard to date handling and null dates.
thanks
Andy
Does anyone know of any good publically available set of standards for
managing dates when dealing with a database server (in my case SQL Server
2000 and c# VS2005).
At the moment, if I create a record in the database for say a job, the
invoicedOn date field will be left null within the data base, not being
assigned untill its actually invoiced.
I can't figure out how to manipulate these date nulls within c#, for
instance displaying a list jobs with their invoiced date, should just
display formatted dates where they exist and be blank if not. This doesn't
seem to work for null dates when formatting is set on the datagrid. Same
goes if I try set a c# datetime field to null. What happens if I need to
remove a date, I can do this on the server, but I cant figure how to do this
in c#
A temporary measure has been to use isnull() in the server and choose a
really obviously incorrect date, but obviously this is a poor way of
handling things..
So what I'm looking for is a 'good practice' document of how to interact
between client and server with regard to date handling and null dates.
thanks
Andy