..:: MX Studio Fóruns ::..: tempo normal de 24 horas - ..:: MX Studio Fóruns ::..

Jump to content

Publicidade




Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

tempo normal de 24 horas

#1 User is offline   xanburzum 

  • Group: Administrador
  • Posts: 2377
  • Joined: 04-November 08

Posted 25 July 2009 - 04:54 PM

A função Time24 converte um tempo para o formato de 24 horas.

sintaxe:
time = Time24 (timeinput)

exemplo :

CÓDIGO
<%
response.write Time24("1:15 pm")
' retorna 13:15

response.write Time24("1:15")
' retorna 01:15

response.write Time24("6:32 pm")
' retorna 18:32

response.write Time24("1:01")
' retorna 01:01
%>


code:


CÓDIGO
<%
Private Function Time24(byVal dtime)
    dim hr,mn
    hr = hour(dtime) : mn = minute(dtime)
    if len(hr) = 1 then hr = 0 & hr
    if len(mn) = 1 then mn = 0 & mn
    Time24= hr & ":" & mn
End Function
%>

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic



Publicidade




2 User(s) are reading this topic
0 membro(s), 2 visitante(s) e 0 membros anônimo(s)