Is that what you want, mate?
char buf1[20];
DateTime now = rtc.now();
//Updated now.day to now.date
sprintf(buf1, "%02d:%02d:%02d %02d/%02d/%02d", now.hour(), now.minute(), now.second(), now.daydate(), now.month(), now.year());
Serial.print(F("Date/Time: "));
Serial.println(buf1);
Is that what you want, mate?
char buf1[20];
DateTime now = rtc.now();
sprintf(buf1, "%02d:%02d:%02d %02d/%02d/%02d", now.hour(), now.minute(), now.second(), now.day(), now.month(), now.year());
Serial.print(F("Date/Time: "));
Serial.println(buf1);
Is that what you want, mate?
char buf1[20];
DateTime now = rtc.now();
//Updated now.day to now.date
sprintf(buf1, "%02d:%02d:%02d %02d/%02d/%02d", now.hour(), now.minute(), now.second(), now.date(), now.month(), now.year());
Serial.print(F("Date/Time: "));
Serial.println(buf1);
Is that what you want, mate?
char buf1[20];
DateTime now = rtc.now();
sprintf(buf1, "%02d:%02d:%02d %02d/%02d/%02d", now.hour(), now.minute(), now.second(), now.day(), now.month(), now.year());
Serial.print(F("Date/Time: "));
Serial.println(buf1);