As written from you:
0 as return value of HOUR() represents 12:AM
23 as return value of HOUR() represents 11:PM
As you mentioned it returns integer between 0-23, so it means there is no 24 as return value.
So, here comes the question, which integer return value represents 12:PM?
super! Thank you!