Send the proper date format to the api