Are there other parameters available that are not listed in the help guide under formulas? I would like to have a full name text day rather than a three letter day. I want it to match what is in Due Date.
Is there a parameter for hour that is based on 12 hour time?
Solved! Go to Solution.
Hi Mike,
The documented list provides all the options for format-date; a full day name is not supported. The options are limited by the XLSForm and XForm specification, which don't have an option for a full day. It would be possible to reconstruct the full day based on the short day:
if(${short_day} = 'Sun' or ${short_day} = 'Mon' or ${short_day} = 'Fri', concat(${short_day}, 'day'), if(${short_day} = 'Tue', 'Tuesday', if(${short_day} = 'Wed', 'Wednesday', if(${short_day} = 'Thu', 'Thursday', 'Saturday'))))
Hi Mike,
The documented list provides all the options for format-date; a full day name is not supported. The options are limited by the XLSForm and XForm specification, which don't have an option for a full day. It would be possible to reconstruct the full day based on the short day:
if(${short_day} = 'Sun' or ${short_day} = 'Mon' or ${short_day} = 'Fri', concat(${short_day}, 'day'), if(${short_day} = 'Tue', 'Tuesday', if(${short_day} = 'Wed', 'Wednesday', if(${short_day} = 'Thu', 'Thursday', 'Saturday'))))
Thanks for the clarification and suggestion. Here was my final calculation
if(format-date(${intake_date},'%a') = 'Sun' or format-date(${intake_date},'%a') = 'Mon' or format-date(${intake_date},'%a') = 'Fri', concat(concat(format-date(${intake_date},'%a'), 'day'),format-date(${intake_date},', %b %e, %Y')),if(format-date(${intake_date},'%a') = 'Tue', concat('Tuesday',format-date(${intake_date},', %b %e, %Y')),if(format-date(${intake_date},'%a') = 'Wed', concat('Wednesday',format-date(${intake_date},', %b %e, %Y')),if(format-date(${intake_date},'%a') = 'Thu', concat('Thursday',format-date(${intake_date},', %b %e, %Y')),concat('Saturday',format-date(${intake_date},', %b %e, %Y'))))))