I am doing DATE_DIFF(doc.date, prob.createdAt, "d", true)
Where the dates are ISO8601 date strings for example:
DATE_DIFF("2020-03-25T07:10:21Z", "2020-03-24T04:59:41+0000", "days", true)
However, I always get null as the result.
I tried ensuring they both show GMT and it is the same.
What am I doing wrong here?
When I create a query that just tests the DATE_DIFF function inputs
//RETURN DATE_DIFF("2020-03-25T07:10:21Z", "2020-03-24T04:59:41+0000",
"days", true)
//RETURN DATE_DIFF("2020-03-25T07:10:21Z", "2020-03-27T07:10:21Z", "days",
true)
RETURN DATE_DIFF("2020-03-22T04:59:41+0000", "2020-03-24T04:59:41+0000",
"days", true)
I can see that any time the time zone is +0000 then the output is
Warnings:
[1572], 'in function 'DATE_DIFF()': invalid date value'
Result:
[
null
]
According to the spec and for easier reading Wikipedia
https://en.m.wikipedia.org/wiki/List_of_UTC_time_offsets
Z is +0000
I inserted : in +0000 as +00:00 and now it works.
Is this expected behavior or am I coming across a bug?
I'm unable to confirm whether or not the offset needs the colon :
--
You received this message because you are subscribed to the Google Groups
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/arangodb/a47378aa-72a4-4d05-a55d-11545ee5bf7a%40googlegroups.com.