simplified query with get date formatted
doctype