Create sql_date_fix

Use case: site report checked to see if a calendar had been updated during the month. If a calendar (PDF file) was updated for this month, and it was checked on the last day of the month, the report would read negative when it should be positive.

This is because the start_date and end_date of uploaded calendars to be displayed did not include a time. Since the time defaulted to midnight, it reported negative on the last day.

The above script casts the DATETIME variable as a FLOAT, then strips the decimal from the FLOAT. This compares date to date without considering time.