Converting the format of a date
The Date plus/minus days logic can be used to convert a date from one format to another.
For example if you want to convert a date from YYYY-MM-DD to DD/MM/YYYY or alternatively from the format DD/MM/YYYY to YYYY-MM-DD.
Converting a date
From the Advanced > Logic page in the control centre for the form, click the Add Logic button.
Give the logic a name.
Select the type Predefined.
Choose the Date plus/minus days formula from the drop down list
In the next step you're going to need to understand the format of the date is orginally in. It may not be in the format you expect. See common date formats used in XFP if you are unsure.
Set the Date to change input to date you want to convert.
Set the input format. See understanding date formats for information on the different date formats.
Select the desired output format. See understanding date formats for information on the different date formats.
Set the +/- input to either plus or minus (it makes no difference when converting a date)
Set the Amount input to 0.
Set the Weekdays or Days input to either Weekdays or Days (it makes no difference when converting a date)
Save the logic. Use the result of the new logic in form templates, other logics and content.
An example showing the conversion of a date from a Date question (YYYY-MM-DD format) into a user friendly format DD/MM/YYYY.