2
votes

I'm trying to retrieve documents newer than some timestamp using the AQL query below. The field date was stored as ISO strings like 2015-01-28T15:39:00.503Z. Is there any other proper data type to store dates in ArangoDB?

for m in messages filter m.date > "2015-01-28T00:00:00" return m

EDIT:

According to this thread, ArangoDB does not support any type of dates. They suggest ISO string comparisons as the way to go. Can anyone confirm that?

2
So, I understand correctly that you have answered your own question in the edit? :) If yes, please make an answer out of it so it is easier for people to understand - 13abylon
@13abylon Almost that! :-) But, in fact, the question remains: is there something better than strings to store timestamps? - mcrisc

2 Answers

1
votes

As far as I know there is only one additional format: the number of milliseconds since a fix point of time (1.1.1970?) see docu, search for "utc". But since this format is not very convient if you want to work with local times, I personally prefer to work with the strings (and typically Skiplists on them).

0
votes

like the answer of the @agustin-s, Try to set the date in number format milliseconds. example Aql,

for v in tweet filter v.timestamp>=(DATE_TIMESTAMP(DATE_NOW()) - (6*10000)) return v._id