Added a function to convert dates into the format used in the REST API
Added a function to convert dates into the format used in the REST API