InvalidCast Exception on date conversion

excel
activities
exception

#1

hi I am retrieving date and time from excel with (mm/dd/yy hh:mm:ss) format and converting it to system date format using convert activity. I get an error saying ‘Invalid Cast exception’’

Capture


#2

Hello,

I believe what you are trying to achieve is called parse.

You can use Datetime.Parse() to get a Date object out of your string.
You should now have any issue finding example on the forum or even on the web for its usage.

Cheers