Hi Danny,
like you can find in the documentation
(http://www.sapdb.org/7.4/htmhelp/48/0d8018b4f211d2a97100a0c9449261/content.htm) the
ISO timestamp format is: 'YYYY-MM-DD HH:MM:SS.MMMMMM' ('1999-01-23 14:30:08.456234').
Therefor the following queries should work:
SELECT * FROM table001 WHERE col_date <= TIMESTAMP ('2003-06-05 23:59:59.999999')
or
SELECT * FROM table001 WHERE DATE (col_date) <= '2003-06-05'
Unfortunately you cannot change the date/timeformat used by the JDBC driver. It will
always used the odbc/ISO date/timeformat.
Regards,
Marco
----------------------------------------------
Marco PASKAMP
SAP DB, SAP Labs Berlin
> -----Original Message-----
> From: Danny Tramnitzke [mailto:[EMAIL PROTECTED]
> Sent: Donnerstag, 5. Juni 2003 15:16
> To: [EMAIL PROTECTED]
> Subject: Compare TIMESTAMP with DATE values
>
>
> Hi all
>
> Sorry for being the one millionth guy, who asked for DATE Values ...
>
> But there is a (I hope tiny) problem with Date comparison :
>
> I have two Values, a Timestamp-Value in the sapdb database
> (table001.col_date), like
>
> 19990123143008456234
>
> and a Date Value, with which I want to compare :
>
> 05/06/2003
>
> (is's the best way for me, to retain that DATE Format )
>
> Now, I want make a selection like :
>
> SELECT * FROM table001 WHERE col_date <= CHAR (TIMESTAMP
> ('05/06/2003') ,
> ISO)
>
> but this doesn't work. (always the error : Invalid date format:ISO. )
> Because this SELECT runs over jdbc , the search-date(right
> side of search-
> condition) must be in ISO-Format, so that I could compare it with the
> TIMESTAMP Values in Table001. How could I do that ?
>
> Best regards,
> Danny
>
> --
> Using M2, Opera's revolutionary e-mail client:
> http://www.opera.com/m2/
> _______________________________________________
> sapdb.general mailing list
> [EMAIL PROTECTED]
> http://listserv.sap.com/mailman/listinfo/sapdb.general
>
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general