formatISOToDateTime method

DateTime formatISOToDateTime()

Implementation

DateTime formatISOToDateTime() {
  String isoDate = substring(0, length - 6).replaceAll('T', ' ');
  DateTime newDateTime = DateTime.parse(isoDate);

  return newDateTime;
}