Sort datetime - possible?

Can funnelback sort results based on datetime metadata? And if so what datetime format does the metadata need to be in?

Had a look through - https://docs.funnelback.com/more/extra/sorting_results.html - seems only sort date is possible

The short answer is no - Funnelback’s has no concept of a time when it interprets and sorts by date.

However, you can achieve a date/time sort if you use an appropriate representation of the date time and then use either a numeric or alphabetic sort against the field.

e.g. if you represent your datetime as a format as

YYYY-MM-DD HH:ii:ss

e.g. 2017-10-21 23:54:33

and index it as a standard metadata field then it’s possible to sort this using the alphabetic sort options.

You can also represent your datetime as a Unix epoch timestamp, index this a type 3 numerical metadata and then this can be sorted numerically.

Note: if you want the date indicated by the datetime field to be assigned as the document’s indexed date then you’ll need this stored in a separate field from the datetime that’s mapped to the date.

Supported date formats are described at:

1 Like

Thanks for the solution.