print Hour and minutes on lcd 20*4

void loop()
int Heure;

char temp[6] = "00:00";

DateTime now =;
Serial.print(, DEC);
Serial.print(now.month(), DEC);
Serial.print(now.year(), DEC);
Serial.print(' ');
Serial.print(now.hour(), DEC);
Heure = DEC * 100;
// Serial.print(now.minute(), DEC);
Heure = now.minute();
//Heure = Heure + DEC;
//Serial.print(now.second(), DEC);
lcd.setCursor(15, 3);
itoa(Heure, temp, 5);
//sprintf(temp, "%d", Heure);
// lcd.printstr(now.hour() * 100 + now.minute());
//char temp = (char)Heure;
//lcd.print("Hello, world! - 2");
I don't know how to solve my problem. It print something on my lcd but I don't understand where it found this. Please help me. I use an lcd i2c. My problem is to put now.minut() and now .Hour() in a string to diplay it on my lcd.

You don’t need to convert the time to a string to display it. You can use the same method as the date.

This works for 24 hour format but you will need to adapt it for your RTC library (I use the DS3231_Simple library):

 rtc =;

  lcd.setCursor(0, 0);
  if (rtc.Hour < 10) lcd.print("0");
  if (rtc.Minute < 10) lcd.print("0");
  if (rtc.Second < 10) lcd.print("0");

Thanks a lot to every ond works fine