Add method to convert a date to another format