aspose file tools*
The moose likes JDBC and the fly likes suspicious datetime Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "suspicious datetime" Watch "suspicious datetime" New topic
Author

suspicious datetime

Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

when talking to a sqlserver 7.0 database, i have different dateformats for setting dates than for getting dates:
These are my statements:
--========================================
create table datest (
dt datetime,
nrint
);
insert into datest values (
'2003-06-04 11:11:11.1', 1);
insert into datest values (
'2003-04-06 22:22:22.2', 2);
--=====================================
-- this what I get:
---------------------
select * from datest;
dtnr
--------------------- --
2003-04-06 11:11:11.11
2003-06-04 22:22:22.22
--==========================================
(see the values of dd and mm are the opposite).
I get this output with different drivers.
(jTDS, jNetDirekt) but only on msSQLserver,
not with HSQLdb or PostgreSQL.
Is this a known issue?
I didn' t find Help ad MSDN or by browsing Google- lotta datetime questions but not this one.


http://home.arcor.de/hirnstrom/bewerbung
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: suspicious datetime