You can just replace the '\n' character in the date string (if null terminated it should be at strlen(date) - 1) with '\0' and it should print on the same line.
date[strlen(date) - 1] = '\0';
EDIT: As pointed out by Joachim strlen
returns length without NULL terminator not raw allocation length so it should be -1 not -2.