Obviously Erel gave you the correct solution, but also you can try this:
Dim query As String = "SELECT * FROM ALARM WHERE TIME >= '2024-11-22 07:12:00' AND TIME <= '2024-12-11 08:05:30' ORDER BY 报警时间 DESC"
So, you can understand by self that the format is 'yyyy-MM-dd HH:mm:ss' (string type)
Try it, and then change it into parameterized queries
A little question: with "TIME" do you means date and time or only time of a day ??