Customizing calculated date format in CommCare

Hi all,

I need to customize the date format of a calculated field. Here’s the bind
statement:

It outputs as yyyy-mm-dd. We need dd-mm-yyyy for local date. Ideally, this
would follow the phone’s default date format. Are either of these possible?

Thanks,
Jon

Jon,

So the format of dates on the chatterbox screen are computed in one of a few
different ways. If the field is being displayed to the user and not used for
further calculations, we can potentially extend the format_date function to
include detailed formatting information.

Not sure if you can pull the current date format from the phone, agreed that
would be the optimal solution to date displays. I’ll look into it.

-Clayton

··· On Sun, Dec 5, 2010 at 2:29 AM, Jonathan Payne wrote:

Hi all,

I need to customize the date format of a calculated field. Here’s the bind
statement:

It outputs as yyyy-mm-dd. We need dd-mm-yyyy for local date. Ideally, this
would follow the phone’s default date format. Are either of these possible?

Thanks,
Jon

Thanks Clayton. Extending the format date function sounds like a good option. We will be doing calculations on the field, so probably best to have a calculated version and a separate display version of the same variable.

Jon

··· Sent from my iPhone

On Dec 6, 2010, at 9:54 PM, Clayton Sims csims@dimagi.com wrote:

Jon,

So the format of dates on the chatterbox screen are computed in one of a few different ways. If the field is being displayed to the user and not used for further calculations, we can potentially extend the format_date function to include detailed formatting information.

Not sure if you can pull the current date format from the phone, agreed that would be the optimal solution to date displays. I’ll look into it.

-Clayton

On Sun, Dec 5, 2010 at 2:29 AM, Jonathan Payne paynejd@gmail.com wrote:
Hi all,

I need to customize the date format of a calculated field. Here’s the bind statement:

It outputs as yyyy-mm-dd. We need dd-mm-yyyy for local date. Ideally, this would follow the phone’s default date format. Are either of these possible?

Thanks,
Jon

Cool, sounds good. What’s the timeline on this?

-Clayton

··· On Mon, Dec 6, 2010 at 11:46 AM, Jonathan Payne wrote:

Thanks Clayton. Extending the format date function sounds like a good
option. We will be doing calculations on the field, so probably best to have
a calculated version and a separate display version of the same variable.

Jon

Sent from my iPhone

On Dec 6, 2010, at 9:54 PM, Clayton Sims csims@dimagi.com wrote:

Jon,

So the format of dates on the chatterbox screen are computed in one of a
few different ways. If the field is being displayed to the user and not used
for further calculations, we can potentially extend the format_date function
to include detailed formatting information.

Not sure if you can pull the current date format from the phone, agreed
that would be the optimal solution to date displays. I’ll look into it.

-Clayton

On Sun, Dec 5, 2010 at 2:29 AM, Jonathan Payne < paynejd@gmail.com paynejd@gmail.com> wrote:

Hi all,

I need to customize the date format of a calculated field. Here’s the bind
statement:

It outputs as yyyy-mm-dd. We need dd-mm-yyyy for local date. Ideally, this
would follow the phone’s default date format. Are either of these possible?

Thanks,
Jon

Not too urgent. Would like before dec 20.

··· Sent from my iPhone

On Dec 6, 2010, at 10:45 PM, Clayton Sims csims@dimagi.com wrote:

Cool, sounds good. What’s the timeline on this?

-Clayton

On Mon, Dec 6, 2010 at 11:46 AM, Jonathan Payne paynejd@gmail.com wrote:
Thanks Clayton. Extending the format date function sounds like a good option. We will be doing calculations on the field, so probably best to have a calculated version and a separate display version of the same variable.

Jon

Sent from my iPhone

On Dec 6, 2010, at 9:54 PM, Clayton Sims csims@dimagi.com wrote:

Jon,

So the format of dates on the chatterbox screen are computed in one of a few different ways. If the field is being displayed to the user and not used for further calculations, we can potentially extend the format_date function to include detailed formatting information.

Not sure if you can pull the current date format from the phone, agreed that would be the optimal solution to date displays. I’ll look into it.

-Clayton

On Sun, Dec 5, 2010 at 2:29 AM, Jonathan Payne paynejd@gmail.com wrote:
Hi all,

I need to customize the date format of a calculated field. Here’s the bind statement:

It outputs as yyyy-mm-dd. We need dd-mm-yyyy for local date. Ideally, this would follow the phone’s default date format. Are either of these possible?

Thanks,
Jon