I have vertex created date in long format (epoch). I want to convert the long value into particular date format (YYYY-MM or YYYY-MM-DD) using gremlin query. .map or .transform is not working. Can someone please help.
相关问题
- Is there a document about how gremlin 'match()
- Gremlin Python in Web Application
- How to connect Gremlin Server to a remote Neo4j Da
- Limit number of items in group().by() in gremlin q
- Merging maps in Gremlin
相关文章
- How to add vertices to gremlin server in a batch f
- How to use ElasticSearch index in Titan Gremlin qu
- Gremlin remote command fails with timeout error: H
- How do I connect to a remote Neo4j database using
- Unable to create a composite index, stuck at INSTA
- Can RDF model a labeled property graph with edge p
- Getting vertices that are connected to ALL current
- gremlin syntax to calculate Jaccard similarity met
The Gremlin language doesn't have built in features to convert dates. You would have to use a lambda if you want to do it within Gremlin - for Groovy it would look like:
You could write the same in Java by skipping the shorthand Groovy provides and just using
SimpleDateTime
in the lambda. Of course, TinkerPop advises against lambdas and in this case, I think that the better solution is to simply return your result as aLong
and then transform it on the client as needed once in hand.