Date format is not possible into UI Path Apps (as per current release) and this is one of the common requirements for apps to format date as per business requirements.
To achieve this please follow the below approach
- Create UI path Process into studio
- Create an “Out_Variable” for single date or “Out_Datatable” Datatable variable for list
- Make sure “Out_Variable” and “out_Datatable” column type is string
- Format the date into desired system (SQL/others) or format it into UI Path studio as below
In_Date.ToString(“dd-MM-yyyy”) - Set the formatted date to out variable
- Deploy the process
- Add Process into Apps
- Make sure Out_Variable is string into Apps process output section
- If you see Out_variable any others type, then please change to string
- Call process wherever is required
- Test
Example
I have created a POC Apps to capture date and show date into “dd-MM-yyyy” format
- Create a process
- Create two arguments
a. In_Date (input date argument) - Type Date
b. Out_DateFormat (to return formatted date) – Type String - Add assign activity and format the date
- Add process into Apps
- Change output type as string
- Call Process on date change
- Run the Apps
Happy Automation !!!