Hi,
I have recently started using the JDBC MS-SQL driver. I am facing a
problem with the setdate() function of the prepared statement. if we are
using the setDate function of the prepared statment then the date gets
updated with a timestamp.
i.e. pObjpreparedStmtIns.setDate(2, pdCurrentDate);
will add the date in the system as 2004-12-27 :12:00:000
instead of 2004-12-27 :00:00:000.
pdCurrentDate is java.sql.Date() set to todays date.
has anyone come acros this problem.
Thank you
"Shirish Nair" <Shirish Nair@.discussions.microsoft.com> schrieb im
Newsbeitrag news:4BAE3584-2220-4DF3-B66C-A75F3CAB3DF8@.microsoft.com...
> Hi,
> I have recently started using the JDBC MS-SQL driver. I am facing a
> problem with the setdate() function of the prepared statement. if we
are
> using the setDate function of the prepared statment then the date gets
> updated with a timestamp.
> i.e. pObjpreparedStmtIns.setDate(2, pdCurrentDate);
> will add the date in the system as 2004-12-27 :12:00:000
> instead of 2004-12-27 :00:00:000.
> pdCurrentDate is java.sql.Date() set to todays date.
> has anyone come acros this problem.
Two things come to mind:
- it's just a display problem (12am ~ 0:00 ~ 24:00)
- it's a time zone offset thingy (are you +/- 12h?)
- you could also try to use java.sql.Timestamp
Regards
robert
Monday, March 19, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment