It's not a secret anymore!
The moose likes JDBC and Relational Databases and the fly likes Date in MS SQL Server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Date in MS SQL Server" Watch "Date in MS SQL Server" New topic

Date in MS SQL Server

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
The problem here is:
Whenever i insert a date in my sql server database it takes it
as 1/1/1900 regardless of whatever date i specify and when
queried from the front-end(java) it returns it as 1/1/1899
could anyone please help me out
narayana satish

Joined: Dec 21, 2000
Posts: 25
Please check out whether it may be default date.Because some one might have created the default constraints in the date.
You can check with some other way, i.e., create your own table with the date field and try to enter into that.
I agree. Here's the link:
subject: Date in MS SQL Server
It's not a secret anymore!