Combine hour() and minute() in HHMM format
Charlieelliott24 opened this issue · 0 comments
Charlieelliott24 commented
Hey folks, anybody happen to know why my hhmm variable prints 0 to prompt?
#include <TimeLib.h>
.....
int hhmm = (hour() * 100) + minute();
.....
Serial.println(hhmm); //it prints 0.
int hhmm = (int(hour()) * 100) + int(minute()); // doesn't work either
Thanks!!