aspose file tools*
The moose likes JDBC 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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "MSSQL  -  Date" Watch "MSSQL  -  Date" New topic
Author

MSSQL - Date

satishind Reddy
Ranch Hand

Joined: Oct 17, 2000
Posts: 33
Hi
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.
'MM/DD/YYYY HH:MM:SS'
Thanks in advance.....
Regards
Satish
NageswaraRao Karra
Ranch Hand

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

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