Link to home
Start Free TrialLog in
Avatar of cat4larry
cat4larry

asked on

Best Default "Value" for DateTime column

Curious which is better, NULL or 1/1/1900
ASKER CERTIFIED SOLUTION
Avatar of Scott Pletcher
Scott Pletcher
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
As per the design perspective,
it should always be NULL, no default value should be put in that place...

As you see if NULL is the default value, then the application can be programmed to ask the user or prompt the use to enter that date.
but if a default value is put in that place, then it may not, not only that NULL's are specifically designed for this purpose in the database.
Avatar of cat4larry
cat4larry

ASKER

What becomes difficult is that the table (and its data) will be used in all sorts of ways.  So I'm just looking for a general "start with this" kind of advice.  I can always modify the nature of the data later if I find it isn't working.  Understand?  So back to my original question is it better in general to leave it NULL or 1/1/1900

Hope I'm making sense.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
My thoughts as well.  Just wanted to verify with someone else.

Thanks
if that answers your question, please close this by awarding the points
thanks Surendra