I need to compare two dates with different formats and find out, if date1 is earlier than date2.
Date1 is from SAP in stringformat “dd.MM.yyyy” and date2 is from excel in generic value(datetime) “dd/MM/yyyy hh:mm:ss”.
First I got the error that the string “dd.MM.yyyy” doesn’t have the right format for datetime. I tried to add 00:00:01 to the string and then convert to datetime, but it still doesn’t recognize it as right format.
Does anybody know how to convert and compare both dates (in an if activity) in order to find out if date1 is earlier than date2?