File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC 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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
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
Similar Threads
Prepared JDBC statements in Servlets?
converting java.sql.Date into GregorianCalendar or Calendar
problem with fetching Date
datepicker.js to sqlserver format
Convert sql date to util date