Click here to Skip to main content
15,920,503 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am stanly.I need one help.
How to avoid default date store in database. Right now i am using 3-tier architecture.If am not selecting any date from the date picker i need store the date in database is Null or empty.

But now the date is storing 01/01/1900 format.The column field datatype is datetime
Posted

1 solution

Add a default constraint to your table as

ALTER COLUMN columnname SET DEFAULT null
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900