You do not need to use DATETIME_FORMAT(), which converts the date information into a text string. The IS_BEFORE function wants the original date data, not the pretty formatted string version of the date.
Does TODAY() return tomorrow’s date before or after 12:00am? Having TODAY() return the next morning’s date at 12:00am is standard behavior for computers. However, if TODAY() is returning tomorrow’s date when it is still 11:59PM, that is a timezone issue.
Does your {Due Date} field include a time? If it included a time at some point, even if it doesn’t now, there might be some hidden time in the fields that is leading to the time zone problems.
You don’t actually need DATETIME_FORMAT. As stated above, that only formats a text output version of the date. It doesn’t actually change the internal date used for comparison.
Try switching TODAY() to NOW(). One of the devs pointed out to me that TODAY() is based in GMT, but NOW() is supposed to use your local time.
The formula field reference has all the information you need to build this formula, but it can take some digging. I also recommend writing the formula using multiple lines outside of Airtable and then copy/paste it.
It really sounds like a timezone and/or a daylight savings time issue.
I looked around a bit, and I think that NOW() might still be based on GMT, not the local time. When I use it in a formula by itself, there is an option to display using the local timezone, but internally it is still stored as GMT.
As I said initially, time zone problems can be difficult to suss out.
There are many factors in play:
the time zone used to store the underlying data
the format settings for the date/time field
the format settings for formulas that produce a date/time
the actual time zone of the user
the time zone of the computer the user is using
These are simply to many moving parts to diagnose over the internet.
My recommendation is to convert your date fields so that they show the time as well as the date. Make sure that all fields are formatted to use the same time zone (GMT). Then make the comparisons based on viewing the time information.
Date/time formatting
When diagnosing date/time and timezone issues, have all involved fields display a time, and also use the GMT time zone.
Date/time settings for a date/time field:
Date/time formatting for a formula field that returns a date/time:
TODAY() vs NOW()
TODAY() returns the current date with a time of 12:00am (GMT). NOW() returns the current date and time (GMT).
Both are stored as GMT, but can be displayed as a local time.
Viewing the actual underlying date/time data
To see the underlying time that is actually stored without Airtable formatting it for your timezone, concatenate the time field with a text string. The resulting string will be ugly, but will reveal the actual time in the field.
Would you mind sharing more about your use case? It is unusual to need to have the date flip exactly at 12:00am local time. Also keep in mind that the TODAY() and NOW() fields are not continuously updated. They are only updated when viewed. Thus, if no-one is accessing any records in the middle of the night, they will not be updated.