The Date/Time component is a valuable tool for capturing date inputs via a user-friendly calendar picker. As part of its design, this component stores all date and time inputs in the ISO8601 format, ensuring the inclusion of time zone information. It's crucial to understand that the component's format setting is primarily for controlling how the date appears to the user. However, the underlying data is consistently stored in ISO8601 format, allowing for easy re-rendering of the date to accommodate various time zones or formats based on the user's locale settings.
With that said it can be useful to pass the date to PowerAutomate is a different format due to the complexity of working with dates and times in Power-Fx. Team Forms offers various options to do so, however in this article we will focus on how to use a calculated value to achieve this.
Drag and drop the date/time component into your form and configure it as desired
Drag a text field into your form
Within the display tab select hidden to hide the component in the form and pdf
value = moment(data.dateTime).format('DD-MM-YYYY')
Now within your Power Automate flow you can access the formatted date using the calculated text field we set up earlier