This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
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 Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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
 
It's not a secret anymore!