Date/Time Fields


If needing to collect dates and or times, this can be done with our Date/Time field in the Advanced Fields section of the builder. 



Once added, the format of both the date and time being collected can be set so it is as needed. There is also the option of 'None' in the format dropdowns if you'd like to only collect dates or times as opposed to both.



Another option available is that of 'Allowed Years'. Setting this will determine what year range will appear for submitters when filling out the form and the default is Current Year +5 and Current Year -5. This means if the year is 2017, then the range available will be 2012 to 2022. You can adjust these limits to be as high as needed and as low as 0, making it the current year. 




In addition to being able to set the range of years that can be chosen, another option is to disable all dates from being able to be submitted after one that you set. This feature is found in the 'Disable Dates Past' section. Once a date is set, no date after that one can be selected by the user and submitted without receiving an error. To enable this, click into the text box below the 'Disable Dates Past' heading:



On the calendar that appears, search for and select the date that you want to disable all dates after:




To remove the date once it's been set, that can be done by clicking the red minus sign that will show next to the date which now will appear in the text box:


Default Values

The Date/Time field can be pre-populated with a date and/or time of your choosing or the current date/time when the form is viewed. To populate the Date/Time field with the date and/or time the form is accessed check off the 'Current Date/Time ' box under 'Default Value'. You'll see the word 'NOW' added to the text box above.



You can also use the current date in some simple equations to set the date and time to a value in the future. For example if you wanted to make the default value of the Date/Time field one year from the date the form is accessed type '+ 1 year' after NOW in the text box.



This also works for months, weeks, days, hours, and seconds (in 5 second intervals).

 

Note: You can also subtract time by using a minus sign and an amount of time in the same way.

If you are looking to have collected dates and times always appear in a defined timezone, then you can adjust the Default on the Date/Time field to use GMT. For example, ’GMT-4’ can be used to calculate the current Central time (CST) based on the time pulled from the submitter's computer/device settings. One caveat here is that you will need to adjust this default value when Daylight Savings rolls around.


It is also possible to set the default date and time to a particular time. Simply type in the date and/or time you'd like the date field to display. Multiple date and time formats are supported including numerical dates and military time.

Accepted date formats include:

February 1, 2018
Feb 1 2018
Feb 1 18
2/1/18
2/1 (will set the date to February 1 of the current year)
2/1/2018
02/01/2018
01/02/2018 (For European Formatted Dates)

Accepted Time formats include:

12:00am
24:00
2400

These options also work with the equation method explained above. If you'd like to set the time to a specific date in the current calendar year and then one year into the future set the date as '2/1 + 1 Year'.

If you visit the form in 2017, the date will be 2/1/2018. If you visit the form in 2018, the date will be 2/1/2019.



Date/Time Calculations

Date/Time fields can now be used in the creation of calculations! For a full walkthrough on how to create these kinds of calculations our full walkthrough can be found here