fixed date formats in query on front end and backend
merged