Using the correct date format for elastic search