I tried the first one and I noticed that in the duration that the hour is 12, PM and AM keeps exchanging each other. I think that while the global variable hour is 12, my event with the else condition is looped until hour becomes 1.
The event is checked every tick right? Then there could be like a number of ticks while hour is equal to 12, therefore they keep exchanging each other.
EDIT: Ok, I got it working, I just needed to a counter to be added in the "If hour is 12" condition. Basically, I made it like this:
If Hour = 12 and PMAM = 0 then PMAM =1 and do the exchanging of PM into AM and vice versa.
Then another event goes like: If Hour = 1 then PMAM = 0.
Thanks for the Else tip!!