fix for date vs datetime