Reputation: 7647
Is there a way in Neo4j to format epoch value saved using timestamp() function as "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'" without using the apoc plugin?
Upvotes: 2
Views: 1648
Reputation: 137
Do not know if this might be useful for somebody but I ended using:
datetime({ epochSeconds:toInteger(VALUE)})
Since using the alternative proposed by Avenger789 was throwing an error.
Upvotes: 1
Reputation: 402
You can use the datetime features of Neo4J to do this. Example below:
RETURN datetime({ epochSeconds:1562735372 }) AS theDate
Or using the timestamp()
RETURN datetime({ epochSeconds:timestamp()/ 1000, nanosecond: 23 }) AS theDate
Upvotes: 3