HOW TO MANAGE DATETIME VARIABLES

Hi everyone!
I created a robot which needs to take a date and post it in another aplication.
In the first part, a messaged box is executed and the user writes a date whose format HAS TO be “dd/mm/yyyy”.
I would like to know how to display an error if the user gives an input with different format than the correct one.

Thanks! Regards,

Hi @francogeno97 ,
You can try it
Datetime.TryParseExact(strInput,“dd/MM/yyyy”,System.Globalization.CultureInfo.InvariantCulture,System.Globalization.DateTimeStyles.None,dateTimeFormat)
Forum1211.zip (4.8 KB)

regards,

@francogeno97

If you use input dialog box then you need to validate the value as mentioned above after it is read into variable

Alternately you can use a form where you can directly give a date picker to frontend and the value can be extracted as you need

Cheers