REM Determinar AM o PM set ampm=AM if !hora! GEQ 12 set ampm=PM if !hora! GTR 12 set /a hora=!hora!-12 if !hora! EQU 0 set hora=12