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
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
 
Similar Threads
sql script works in mssql but not in mysql
Is it above correct statement insert date in Access database table
jdbc and insert date how
want to insert photo(jpeg) in mssql image datatype
Problem with date insertion in MySQL