I am not a professional, so please help me. I would like to copy date and time values to already defined variable ( char sdate[11] and char stime[9] ). I have tried like
it sais invalid conversion from int to const char. I would like to do this because I want to try reading out date and time from NTP server instead of the RTC just for testing. With RTS I used
thanks for the quick response! Can I find somewhere here a description about sprintf() , especially I would like to know the meaning of %d , %s , %i, %t, and so on..?
sdate and stime are char (char sdate[11] and char stime[9] ).
Now the values are:
date is 2014-3-11 (should be 2014-03-11) and time is 10:9:3 (should be 10:09:03).
Format is now ok and I am just looking for the snprintf() specifications! Before this topic I haven't found the %02d value, but now already checked again for the leading 0 issues.
Many thanks for the help!