The other way is using result_format=datetime
.
Here is the code example:
*** Settings ***
Library DateTime
*** Variables ***
${a} 12/30/2023
${b} 12/16/2022
${Date_Format} %m/%d/%Y
*** Test Cases ***
Test Date
${a_date} Convert Date ${a} result_format=datetime date_format=${Date_Format}
${b_date} Convert Date ${b} result_format=datetime date_format=${Date_Format}
Log To Console a is :${a_date}, b is:${b_date}
IF $a_date > $b_date
Log To Console a is greater than b
ELSE
Log To Console b is greater than a
END