Arangodb days between time stamps
Are there built-in functions to find out the number of days between timestamps, add days, or find the number of months between timestamps? I currently store dates in my documents as strings.
For example, if:
return (DATE_TIMESTAMP("2014-2-1") - DATE_TIMESTAMP("2014-1-1")) / 86400000
I get:
[
31
]
which is the correct number of days I'm looking for. Just wanted to check and see if there are any built-in functions or any plan for adding them.
+3
source to share
1 answer
I can confirm that there is currently no built-in function to calculate the number of days or months between two given dates or timestamps. I am not aware of any plans to add such features anytime soon, so your best bet is to calculate the differences like in the code above, or, for something more complex, a custom function.
+2
source to share