# BASIC 256 - Language Documentation

pt:hour

## Hour

### Formato

hour
hour()

### Descrição

Devolve a hora do relógio do sistema (0-23).

### Exemplo

    # display nice date
    dim months$(12)
    months$ = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}
    print year + "-" + months$[month] + "-" + right("0" + day, 2)
    # display pretty time
    h = hour
    if h > 12 then
    h = h - 12
    ampm$ = "PM"
    else
    ampm$ = "AM"
    end if
    if h = 0 then h = 12
    print  right("0" + h, 2) + "-" + right("0" + minute, 2) + "-" + right("0" + second, 2) + " " + ampm$

mostrará algo como.

    2010-July-15
    10-00-02 PM

### Ver Também

Day, Minute, Month, Msec, Second, Year

### Introduzido

0.9.4

pt/hour.txt · Last modified: 2012/12/21 03:13 by m_santos