Changing the format of a date attribute