An awk solution with the example text in the file datestamp
awk -F [\"-.T] '
/^\"StartDateTime/ { yr=$5;
mn=$6;
dd=$7;
split($8,tim,":")
}
/^\"EndDateTime/ { yr1=$5;
mn1=$6;
dd1=$7;
split($8,tim1,":")
}
END { dat1=yr1" "mn1" "dd1" "tim1[1]" "tim1[2]"
"tim1[3];
dat2=yr" "mn" "dd" "tim[1]" "tim[2]"
"tim[3];
timdiff=mktime(dat1)-mktime(dat2);
print timdiff/60
}' datestamp
We set up field separators in order to parse the lines in order to extract years, months, days, hours, minutes and seconds. We set up variables for each of these referencing start and end dates/times. We then use awks mktime function to get the epoch format of the start and end dates, get the difference in epoch format and then get an approximate difference in seconds, dividing by 60 to get the difference in minutes.