Using char instead of string (this is in the main loop for now).
//Extract Date and Time from stringbuffer (which is of type char)
char timeBuffer[9];
timeBuffer[9] = '\0';
for (int x = 5; x < 5 + dateLength; x++)
{
timeBuffer[x] = StringBuffer[x];
Serial.print(StringBuffer[x]); //prints separate chars
}
Serial.println("");
Serial.print("timeBuffer printed output is ");
Serial.println(timeBuffer);
Output is
10041245
timeBuffer printed output is
Separate characters are printed, but timeBuffer is not printed even when I added a null char to the end.