Date Functions

Should we expect ISO 8601 support via date/time comparison functions in the future? Or should I start converting all of my string formatted dates in JSON documents to timestamps?

3 Answers

« Back to question.

Jonathonl,

Thank you for the input. I've opened a ticket to add numeric datetime functions:

http://www.couchbase.com/issues/browse/MB-9881

« Back to question.

Wouldn't it be more efficient to store dates/times as integer timestamps, in particular when using a start_key and/or end_key when querying a view? Seems like a lot of overhead to have to parse a string for each row.

« Back to question.

Your string-formatted dates are fine. We intend to add standard datetime representations, and ISO 8601 is certainly a candidate. But we would also add functions for parsing your existing strings into datetimes using custom formats. There's no ETA on datetime support yet, but it's part of the pipeline.