File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

suspicious datetime

 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic