Add setter method for datetime and date attributes