The second value 4
is insert
$time= time() + (1 * 24*60*60);
$rr = date('Y-M-d' , $time);
$sql = "INSERT INTO time_on_screen(wakeup, sleep) VALUES ( '$rr' ,4)";
mysqli_query($conn,$sql);
The second value 4
is insert
$time= time() + (1 * 24*60*60);
$rr = date('Y-M-d' , $time);
$sql = "INSERT INTO time_on_screen(wakeup, sleep) VALUES ( '$rr' ,4)";
mysqli_query($conn,$sql);
Depending on your locale, '$rr
' is something like '2020-Sep-30'
, and that is not a valid MySql date. You need '2020-09-30
'.
Try:
$rr = date('Y-m-d' , $time); // M -> m