How do you validate timestamp using javascript and timestamp to accept multiple formats e.g. YYYY-MM-DD HH:mm:ss.S, YYYY-MM-DD HH:mm:ss AM/PM.