Table of Contents
What is the Date-Time element?
The Date-Time element allows the user to combine the functionality of both the Date and Time elements.
PLEASE NOTE: The following instructions assume you know how to add the Date-Time element to your form. If you do not, please follow the instructions HERE.
How do I dynamically populate the Date-Time element?
PLEASE NOTE: This functionality currently only works on iOS.
STEP 2. You must first declare your variable. This can be named whatever you like. In this example, we'll be using myTime.
Each number represents a different aspect of time.
- 1988 - The year.
- 3 - The month. Note that the number used for the month is an index value which starts at 0. So while April is the 4th month, its index value is 3.
- 12 - The day of the month.
- 6 - The hour of the day. Note that this number is based on a 24-hour clock. So this will reflect 6 am. If you wanted 6 pm, this number would be 18.
- 30 - The minutes of the hour.
- 0 - The seconds of the minute.
PLEASE NOTE: This will work on both the Date and Time elements individually, but will only use the numbers that are applicable. For instance, the Time element would only reflect 6:30 am.
STEP 4. Click Save then Close.
STEP 5. In the Dynamic Value field of the element, place your variable.
STEP 6. Save your form.
STEP 7. Test the functionality on your device.
Please sign in to leave a comment.