Configure the format of your date
When you open the Template configuration sidebar, you will notice different date and time formatting options in the 'Date' marker:
Form Publisher lets you choose between different formats:
- dd/MM/yyyy HH:mm:ss
- MM/dd/yyyy hh:mm:ss
- yyyy/MM/dd HH:mm:ss
If you want to display the time with AM/PM settings instead of military time, just write 'hh' in lowercase, and add an 'a' in the format settings: 'MM/dd/yyyy hh:mm a'
→ 01/31/2015 6:30 PM
Patterns you can reuse to change your date format
Date and time formats have to follow very specific and precise patterns, formed with letters in uppercase from A to Z, and in lowercase from a to z.
Here is a table displaying the letters used to write date and time using specific formats:
In general, if there are 4 (or more) pattern letters, text formatting will be applied. If it’s less than 4 letters, the text will be shortened or be recognized as a number:
EEEE → Tuesday
EEE → Tue
Months
Type each pattern letter at least 3 times or more to display them in text format:
MMMM → September
MMM → Sep
Use as many letters as there are digits to display months in number:
MM → 09
Years
Use 2 pattern letters to truncate the year to 2 digits:
YY → 15
Use more than 3 pattern letters to display the year completely, as a number:
YYYY → 2015
Hours and Minutes
By default, hours are displayed between 0 and 23 and minutes between 00 and 59.
Use 2 pattern letters to display hours and minutes with 2 digits:
HH:mm → 22:23
To display hours from 1 to 12, use 'hh':
hh:mm → 10:23
Add 'a' after writting patterns to precise am / pm:
HH:mm a → 10:23 PM
Read the complete documentation about date and time settings
Comments
6 comments
Any way to format the output date captured using the date picker in a form? Currently it comes as yyyy-mm-dd but I would love for 'MMM d, YYYY'
Hi,
@Craig, you can do that by editing the configuration of the question in the Template sidebar just as explain in this article.
*facepalm*
My apologies, when I originally read this I thought it applied only to the timestamp.
What about changing time zone. Default is GMT but need to change to PST
@Yrosales,
Hey there, we can change the time zone for you. Just drop us a message here:
support@form-publisher.com
That will be great! My Time Zone is PST (Pacific Standard Time) California
Please sign in to leave a comment.