improve debug logging for date converter and trim date format
(cherry picked from commit d2fb5cc7e10260c5450166bbff95be31bbd236f2)