This thread describes converting the date picker output format.
I adapted it to convert the date to YYYY-MM-HH and constructed this select statement which works for me:
select * from socketevent where ontime between "2022-06-02" and "22-06-05";
+------+---------------------+--------+---------------------+--------+------+
| id | ontime | onkwh | offtime | offkwh | temp |
+------+---------------------+--------+---------------------+--------+------+
| 5445 | 2022-06-02 06:56:52 | 31.12 | 2022-06-02 07:26:52 | 31.302 | NULL |
| 5446 | 2022-06-02 08:36:55 | 31.302 | 2022-06-02 08:43:08 | 31.396 | NULL |
| 5447 | 2022-06-02 13:55:50 | 31.397 | 2022-06-02 14:08:09 | 31.528 | NULL |
| 5448 | 2022-06-03 07:38:25 | 31.528 | 2022-06-03 08:08:26 | 31.688 | NULL |
| 5449 | 2022-06-03 08:08:34 | 31.69 | 2022-06-03 08:20:18 | 31.737 | NULL |
| 5450 | 2022-06-04 07:48:50 | 31.737 | 2022-06-04 08:18:50 | 31.934 | NULL |
| 5451 | 2022-06-04 08:35:52 | 31.935 | 2022-06-04 09:05:52 | 32.048 | NULL |
Note that "2022-06-02" is interpreted by the database as "2022-06-02 00:00" so records from 2nd June are retrieved, but no records from 5th June are.