How to format a date property in case list or case detail

commcare

I would like to output a date in a custom format in the case list.

I have a date property, i.e. date-opened
And it currently displays as, 2017-03-01 (format/ YYYY-MM-DD)

I would like it to output, Mar 01

format-date(date(/data/my_date), "%b %e")

In the case list, I specified the property, 'date-opened'
Under 'format', I select calculate

This syntax caused an application error, identified during the app update on mobile.

Any suggestions on how to format a date in the case list or case detail are very welcome.

Best Answer

Is this just an example, or is this verbatim what you have in the case list?

format-date(date(/data/my_date), "%b %e")

The problem is /data/my_date doesn't exist, that's just an example in the documentation that you need to fill with the thing you're trying to reference. I think you need this:

format-date(date(date-opened), "%b %e")

This may also work - not sure:

format-date(date(.), "%b %e")