Dates are date type and when task scheduler completes the tasks and writes to excel, the dates become datetime format.
I tried even truncating in the logic but it sti