Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gremlin has on Date field #1650

Closed
DiegoMartelli opened this issue Aug 30, 2013 · 2 comments
Closed

Gremlin has on Date field #1650

DiegoMartelli opened this issue Aug 30, 2013 · 2 comments
Assignees
Milestone

Comments

@DiegoMartelli
Copy link

Version 1.5 (last release)
We have a vertex with a date field.

if I call this gremlin through rest:
g.V('@Class','myVertex').has('dateField', T.lte, new Date())
Orient returns:
System.Exception: DB Error:InternalServerError. Msg:com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error on parsing command at position #65: Invalid keyword 'AUG'
Command: select from V where @Class = 'myVertex' and dateField <= Fri Aug 30 17:19:39 CEST 2013 LIMIT 2147483647

If I change the query in:
g.V('@Class','myVertex').as('x').has('dateField', T.lte, new Date())
all works.

@lvca
Copy link
Member

lvca commented Aug 30, 2013

Try using:

g.V('@Class','myVertex').has('dateField', T.lte, new Date().getTime())

@lvca
Copy link
Member

lvca commented Aug 30, 2013

Moved here: orientechnologies/blueprints#7

@lvca lvca closed this as completed Aug 30, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants