make sure date value is a string