Hi.
How are you storing these dates?
If they are being stored in any decent database system, you would most likely be far better of using that system's date type. Like the DATE type, found in pretty much all SQL servers.
In any case, you would have to convert either format to match the other, or simply extract the year and month from both and compare them.
The
substr function should help you there.