Date Picker value to be stored in the variable

Hi, Request you to help to what expression we need to write in the date picker value of create rule(set value) to save selected date by the user to store in a variable

Hi @nagendra.pabba1 ,

Welcome to the Community!

I assume you are asking for the Default date property in Date picker.
If yes, try the below steps.

  1. Create an App Variable
  • Go to the Variablespanel in UiPath Apps.
  • Click Add Variable.
  • Name it (e.g., selectedDate).
  • Set the Type to DateOnly.
  1. Add a Date Picker Control
  • Drag and drop a Date Picker control onto your App canvas.
  • Rename it (e.g., DatePicker1) for clarity.
  1. Bind the Date Picker to the Variable
  • Select the Date Picker control.
  • In the Properties panel, set the Value to selectedDate.
  1. (Optional) Use a Button to Trigger a Rule
  • Add a Button control (e.g., “Save Date”).
  • In the button’s Rules section, add a Set Value rule.
  1. Configure the Set Value Rule
  • Target: selectedDate
  • Value: DatePicker1.Value

This ensures the selected date is stored in the selectedDate variable when the rule is triggered.

Please let us know your result.

Happy automation

1 Like

@nagendra.pabba1 I think what you’re asking is about converting the input string into a Date variable. You can use UiPath activities to change the value into a Date data type, which will make it easier to use in your automation.

And the below post will help you

1 Like

Hi @nagendra.pabba1

Welcome to UiPath,

use a DateTime variable named dt_date (type DateTime), a String variable named str_date (type String), then in Assign write str_date = dt_date.ToString(“MM/dd/yyyy”) to save the selected date.

If you found helpful, Mark as a solution tick .
Happy Automation

1 Like

Thank you very much for all of you, for your response on the query. Now, I can set the value of the selected date. Appreciate your suggestions on this :blush:

Great, Pls feel free to mark as a solution and close the topic.
thanks

1 Like

Hi all,

The query has been resolved. Thanks all for your efforts on this :smiling_face:

1 Like

Hi @nagendra.pabba1 ,

Happy to hear that your query has been resolved.
To close this case. Choose the reply that helped you to solve your query by marking it as Solution.

Cheers!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.