Adding exception catch for datetime convertion