need to formate the json and db timedate format