How do I add the date and time to a web page:
ESP32 DHT11/DHT22 Web Server – Temperature and Humidity using Arduino IDE
Start your code here
server.on("/CurrentDate", HTTP_GET, [](AsyncWebServerRequest *request){
request->send_P(200, "text/plain",readDate().c_str());
String readDate(){
showTime();
float tempT = currentDate1;
Serial.print(“Current Date: “);
Serial.println(tempT);
return (tempT);
}