Work with Dates


#1

Hi all,

i am trying to figure out how to work with date’s

i got the date from sap that is written like 22.07.2017
i am trying to put this in uipath variabel as a Date… but i cant get it to work.

can somebody tell me how to change a string to date?

thanks!


#2

Hi @amo
You can use DateTime.ParseExact(stringDate, formatDate,Nothing) where stringDate = “22.07.2017” and formatDate = “dd.MM.yyyy”

Regards,
Susana


#3

You can use Convert.ToDateTime(stringDate)


#4

Thanks susana,

that works fine!