i am trying to write code that will tell me if one date is before another. This is the code i have writen but it will not work please help me.

if date1 > date2 then

if any of ou can please help
thanks
dave