Unable to write on SD the same data showed on serial monitor

You can use the sprintf() function to format the output into char array and then write the char array to the SD card. Look it up, lots of references.