Overview
Configure Mirata forms to capture and display timezone information from a datetime onto a string field.
Capture True Date and Time
Add DateTime Field
Add a DateTime field to your form to capture the precise date and time of an event. This ensures accurate record-keeping and provides the necessary data for later timezone conversion. Add a string field to your form, this will be used in the next step to display the correct timezone.
Control DateTime Field Visibility
Configure the visibility of the DateTime field to hide it when the form status is 'Completed'. This allows the datetime field to be accessible throughout the form's creation and editing phases of the workflow.
Format Date and Time with Timezone
String Field for Formatted Output
Now take the String field you added to your form and make it read-only format. This field serves as the designated area to present the timezone-inclusive date and time, which is especially useful for PDF generation.
Apply Date Formatting Calculation
Add a calculation to the String field to automatically format the captured date and time, including the user's timezone. Configure this calculation to run when the field is enabled. Use a format string, such as MM/dd/yyyy hh:mm aa OOO (alphabetical O not zeros), to include the date, time, and timezone offset. This generates a readable string for accurate representation in documents.
Include Timezone
Use 'OOO' in the format string to automatically include the user's device timezone in the formatted date.
Control String Field Visibility
Configure the String field's visibility to show only when the workflow is complete. Set its visibility or enabled condition to display when the form status is 'Completed'. This ensures the timezone-inclusive date and time string appears only at the final stage, providing a clear, uneditable record.
Enable the String field to populate and display the formatted date and time string only when the workflow reaches its final 'Completed' status. Set the String field to enable when the form status is 'Completed'. This ensures the timezone-formatted date and time string is ready for display or PDF generation precisely at the conclusion of the workflow.