wood burning stoves
The moose likes JDBC and Relational Databases and the fly likes MSSQL  -  Date Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "MSSQL  -  Date" Watch "MSSQL  -  Date" New topic

MSSQL - Date

satishind Reddy
Ranch Hand

Joined: Oct 17, 2000
Posts: 33
In my table orders i have a column date which is having data type is 'datetime'.
insert into orders(column1,column2,column3)values(1,'12/02/2000',3)

if i used above syntax in MSSql it insert's record into table. But in java program it is giving some error.
can any one tell me how to insert date and time in MSSql. as below mentioned format.
Thanks in advance.....
NageswaraRao Karra
Ranch Hand

Joined: Nov 12, 2000
Posts: 34
have you tried with TimeStamp in java.sql package
Edgar Sanchez

Joined: Oct 12, 2000
Posts: 21
Take a look at my post in this discussion.
Hope that helps...
I agree. Here's the link: http://aspose.com/file-tools
subject: MSSQL - Date
It's not a secret anymore!