changed encounter date format to datetime