How can I compare publish and update dates for a single post?

get_the_date() and get_modified_date() don’t return time values: so, if you change your conditional statement to the below, it should work:

if ( get_the_modified_date() > get_the_date() )
{
...
}

Now if the updated date is greater than the original publish date(by one day), the if statement is true.