added code to fix the date format of the date parameter being passed