I have two dates (parsed using str2time). How can I tell if one is after the other?
PostgreSQL compare date is used to compare date between two different dates, which we have used as an input. We can compare the date by using where and between clauses; we can also compare the date using the date_trunc function in PostgreSQL.
str2time returns a "unix time", ie the number of seconds after 1 Jan 1970. So you have two integers, and you can compare them like you compare any other integers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With