I have the datetime field in the property of the node, I can return the values, but not working for WHERE clause enter image description here

If I use where for specific date its not returning enter image description here

enter image description here

Also i want to return the last 3 days transaction, i tried datetime() minus datetime('2020-03-02T00:01:44.68Z'), i couldn't return

2 Answers

Yes, Found it, datetime field need casting to filter the date or datetime Thanks

enter image description here

enter image description here

one thing i couldn't is to get the last 3 days, i have to check the t.TxnDateTime and the current datetime() difference of 3 days

As documented, comparisons can only be done between temporal instant values of the same type. For example, a date cannot be compared to a datetime, but it can be compared to another date.

Also, you can use an appropriate duration function (such as duration.inSeconds()) to subtract 2 temporal values, creating a duration. And you can then access a component of that duration using an appropriate property (such as seconds).

For example, this query:

WITH duration.inSeconds( date({year:2000, month:1, day:1}), date({year:2000, month:1, day:2})) AS durationInSeconds RETURN durationInSeconds, durationInSeconds.seconds 

returns:

╒═══════════════════╤═══════════════════════════╕ │"durationInSeconds"│"durationInSeconds.seconds"│ ╞═══════════════════╪═══════════════════════════╡ │"P0M0DT86400S" │86400 │ └───────────────────┴───────────────────────────┘ 

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.