Question about conversion of datetime to epoch
Hii,
I wanted to know if there's a way to convert datetime stored in a node to epoch, without using lambdas because I don't want to compromise on performance.
The reason why I'm doing this is to figure out the time difference between two timestamp values in nodes, something like this : -
I wanted to know if there's a way to convert datetime stored in a node to epoch, without using lambdas because I don't want to compromise on performance.
The reason why I'm doing this is to figure out the time difference between two timestamp values in nodes, something like this : -
g.V().has("Customer",'customerId', 'abc').out()
.has("Attempt", "eventTimestamp", between(datetime(LocalDateTime.parse('2023-03-01T00:00:00').minusDays(15).toString()),
datetime(LocalDateTime.parse('2023-03-01T00:00:00').minusDays(1).toString())))
.as('a').values('nodeCreatedAt').in().hasLabel('Device').values('nodeCreatedAt').as('b')
.math('a - b').by('nodeCreatedAt')