Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MSSQL - Date

 
satishind Reddy
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello!
have you tried with TimeStamp in java.sql package
 
Edgar Sanchez
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at my post in this discussion.
Hope that helps...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic