Change dateStr to dateObj.
Combine 12 hour convert function.