jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: SQL query with datetime values
Date Mon, 04 Dec 2006 09:03:35 GMT
Lei Zhou wrote:
> Could anyone advise what is the correct format to write the following SQL 
> queries that includes datetime comparisons?
> 
> select * from my:nodeType 
> where my:dateProp = xs:dateTime('2006-11-22T00:00:00.000-05:00')

xs:dateTime() is a XPath specific function and cannot be used in SQL. Jackrabbit 
uses the SQL 92 standard:

SELECT * FROM my:nodeType
     WHERE my:dateProp = TIMESTAMP "2006-11-22T00:00:00.000-05:00"

regards
  marcel

Mime
View raw message