Fix switch case for date case