You are missing the quotes around the l.eventEndTime>=2013-12-3017:37:00
string.

Please keep the mailing list copied, other folks can also contribute.

Regards
Luanne


On Mon, Dec 30, 2013 at 5:53 PM, Sukaant Chaudhary <
[email protected]> wrote:

> Hi Luanne,
> I tried the following query:
>
> START n=node(2) MATCH (n)-[:FOLLOWED_BY*..5]->(m) WITH distinct m > MATCH
> (m)-[:PUBLISHED_UNDER*..5]->(l) WHERE l.eventStartDate + l.eventStartTime
> >= '2013-12-3017:37:00' OR l.eventEndDate +
> l.eventEndTime>=2013-12-3017:37:00 RETURN l ORDER BY l.eventStartDate +
> l.eventStartTime ASC SKIP 0 LIMIT 25;
>
> Now I'm getting the following exception:
>
> SyntaxException: Invalid input ':': expected whitespace, an identifier, an 
> expression or ']' (line 1, column 80)
>
>    -
>    ==> "START n=node(2) MATCH (n)-[:FOLLOWED_BY*..5]->(m) WITH distinct m > 
> MATCH (m)-[:PUBLISHED_UNDER*..5]->(l) WHERE l.eventStartDate + 
> l.eventStartTime >= '2013-12-3017:37:00' OR l.eventEndDate + 
> l.eventEndTime>=2013-12-3017:37:00 RETURN l ORDER BY l.eventStartDate + 
> l.eventStartTime ASC SKIP 0 LIMIT 25"
>    - ==
>    ^
>
>
>
> -Sukaant Chaudhary
>
>
> On Mon, Dec 30, 2013 at 5:38 PM, Luanne Coutinho <
> [email protected]> wrote:
>
>> Sukaant, just make a string with your format:
>> "2013-12-3017:37:00"
>>
>> And use that in place of timestamp().
>> That will work on the console.
>> If passing a in a value through a programming  language/api, then please
>> parameterize your query by following
>> http://docs.neo4j.org/chunked/milestone/cypher-parameters.html
>>
>> -Luanne
>>
>>
>> On Mon, Dec 30, 2013 at 5:34 PM, Sukaant Chaudhary <
>> [email protected]> wrote:
>>
>>> Hi Luanne,
>>> Please try the following query in the given URL
>>> and help me how to pass in a string value of the current datetime to
>>> compare:
>>>
>>> START n=node(2) MATCH (n)-[s:FOLLOWED_BY*..5]->(m) WITH distinct m >
>>> MATCH (m)-[r:PUBLISHED_UNDER*..5]->(l) WHERE l.eventStartDate +
>>> l.eventStartTime >= timestamp() OR l.eventEndDate +
>>> l.eventEndTime>=timestamp() RETURN l ORDER BY l.eventStartDate +
>>> l.eventStartTime ASC SKIP 0 LIMIT 25;
>>>
>>>
>>> http://ec2-54-213-105-153.us-west-2.compute.amazonaws.com:7474/webadmin/#/console/
>>>
>>> -Sukaant Chaudhary
>>>
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to