PaulStoffregen / Time

Time library for Arduino
http://playground.arduino.cc/code/time
1.24k stars 664 forks source link

Combine hour() and minute() in HHMM format #178

Open Charlieelliott24 opened 1 year ago

Charlieelliott24 commented 1 year ago

Hey folks, anybody happen to know why my hhmm variable prints 0 to prompt?

include

..... int hhmm = (hour() * 100) + minute(); ..... Serial.println(hhmm); //it prints 0.

int hhmm = (int(hour()) * 100) + int(minute()); // doesn't work either

Thanks!!