How to change the way a date is formatted in an export in CommCare

commcare

Is it possible to change the way a date is formatted in a CommCare data export? from yyyy-MM-dd to MM/dd/yyyy?

Best Answer

It's not possible to arbitrarily change the date in an export. You can format a date for excel by checking the box "Automatically convert dates and links for Excel" (turned on by default).

Date format without excel formatting:

%Y-%m-%dT%H:%M:%SZ
> 2017-03-02T14:10:34.240000Z

Date format with excel formatting:

%Y-%m-%d %H:%M:%S
> 2017-03-02 14:10:34 (Note: Excel will automatically reformat this)

If you want a different date format completely, you should build that into your app using format-date