Tutorial - Format date into UiPath Apps

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

  1. Create UI path Process into studio
  2. Create an “Out_Variable” for single date or “Out_Datatable” Datatable variable for list
  3. Make sure “Out_Variable” and “out_Datatable” column type is string
  4. Format the date into desired system (SQL/others) or format it into UI Path studio as below
    In_Date.ToString(“dd-MM-yyyy”)
  5. Set the formatted date to out variable
  6. Deploy the process
  7. Add Process into Apps
  8. Make sure Out_Variable is string into Apps process output section
    image
  9. If you see Out_variable any others type, then please change to string
  10. Call process wherever is required
  11. Test

Example
I have created a POC Apps to capture date and show date into “dd-MM-yyyy” format

  1. Create a process
  2. Create two arguments
    a. In_Date (input date argument) - Type Date
    b. Out_DateFormat (to return formatted date) – Type String
  3. Add assign activity and format the date
    image
  4. Add process into Apps
  5. Change output type as string
    image
  6. Call Process on date change
    image
  7. Run the Apps

Happy Automation !!!

2 Likes

An other option is this :

1 Like