... AND date > TIMESTAMP '2009-12-31T00:00:00.000Z'

Cheers,
Jan

On Jul 23, 2010, at 2:09 PM, [email protected] wrote:

> I'm trying to write an sql query to get all events within a certain date 
> range. So far I have a query to get all events: 
> 
> select * from nt:base where mgnl:template='stkEvent' and jcr:path like 
> '/demo-project/%' 
> 
> 
> When I run this query one of the events returned, for example, is the New 
> Year's Eve event: 
> 
> - <sv:node sv:name="new-year-s-eve" xmlns:sv="http://www.jcp.org/jcr/sv/1.0"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> 
> - <sv:property sv:name="jcr:primaryType" sv:type="Name"> 
>   <sv:value>mgnl:content</sv:value> 
>   </sv:property> 
> - <sv:property sv:name="jcr:mixinTypes" sv:type="Name"> 
>   <sv:value>mix:lockable</sv:value> 
>   </sv:property> 
> - <sv:property sv:name="jcr:uuid" sv:type="String"> 
>   <sv:value>627e44d9-b582-4798-82e6-69f1759ce896</sv:value> 
>   </sv:property> 
> - <sv:property sv:name="abstract" sv:type="String"> 
>   <sv:value>This is the abstract of an event-page. It is a brief résumé on 
> the content of this page. The abstract on the beginning of a page is also 
> used in teasers and openers that reference this page. Li Europan lingues es 
> membres del sam familie. Lor separat existentie es un myth.</sv:value> 
>   </sv:property> 
> - <sv:property sv:name="date" sv:type="Date"> 
>   <sv:value>2009-12-31T14:00:00.000Z</sv:value> 
>   </sv:property> 
> - <sv:property sv:name="dateEnd" sv:type="Date"> 
>   <sv:value>2010-01-01T05:00:56.000Z</sv:value> 
>   </sv:property> 
> - <sv:property sv:name="eventTitle" sv:type="String"> 
>   <sv:value>Basels most famous New Year's Eve</sv:value> 
>   </sv:property> 
> - <sv:property sv:name="hideInNav" sv:type="Boolean"> 
>   <sv:value>false</sv:value> 
>   </sv:property> 
> - <sv:property sv:name="image" sv:type="String"> 
>   <sv:value>upload</sv:value> 
>   </sv:property> 
> - <sv:property sv:name="imageLocation" sv:type="String"> 
>   <sv:value>above</sv:value> 
>   </sv:property> 
> - <sv:property sv:name="link" sv:type="String"> 
>   <sv:value>http://www.magnolia-cms.com</sv:value> 
>   </sv:property> 
> - <sv:property sv:name="linkTitle" sv:type="String"> 
>   <sv:value>New Year's Eve</sv:value> 
>   </sv:property> 
> - <sv:property sv:name="location" sv:type="String"> 
>   <sv:value>Marktplatz</sv:value> 
>   </sv:property> 
> - <sv:property sv:name="title" sv:type="String"> 
>   <sv:value>New Year's Eve</sv:value> 
>   </sv:property> 
> 
> The event has a date property: sv:property sv:name="date". How can I 
> incorporate that into my query. 
> 
> Basically, give me all the events that occur after 2009-12-31T00:00:00.000Z 
> 
> Thanks 
> 
> Rich Gange
> Systems Analyst II, ISD
> Manatee County Government
> (941) 748-4501 Ext. 3918



----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to