Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

marcelinho

hora

Recommended Posts

ae galera beleza?

 

entao eu queria que qdo o usuario logasse aparecesse Bom dia fulano..ou Boa tarde fulano ou Boa noite fulano...e eu tentei fazer mais nem deu certo alguem pode me ajudar ae?

 

acho que é mto simples fazer isso....mais eu nem consegui...olha o jeito que eu estava fazendo:

 

 

if time > 6 and time < 12 thenresponse.write "Bom dia  " & nLoginelseif time >12 and time < 18 thenresponse.write "Boa tarde  " & nLoginelseif time > 18 and time < 6 then response.write "Boa noite " &nLogin end if

valeu

Compartilhar este post


Link para o post
Compartilhar em outros sites

if time > 6 and time < 12 thenresponse.write "Bom dia  " & nLoginelseif time >12 and time < 18 thenresponse.write "Boa tarde  " & nLoginelseif time > 18 and time < 6 then response.write "Boa noite " &nLogin end if
poe aspas nos numeros

 

 

[tr][/tr][tr][/tr]
ASP <%

hora = time()

If hora >= "18" And hora < "24" Then

saudacao = "Boa noite "

End if

 

If hora >= "0" And hora < "12" Then

saudacao = "Bom dia "

End if

 

If hora >= "12" And hora < "18" Then

saudacao = "Boa tarde "

End if

%>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Dá uma olhada nesse link: Tópico

Compartilhar este post


Link para o post
Compartilhar em outros sites

Se você quiser tem este.

 

<font face= "tahoma" size="1" color="#666666"><b><%         If hour(time)<12 Then %>             Bom dia!      <%  ElseIf hour(time)<18 Then %>             Boa tarde!      <%  Else %>             Boa Noite!      <%  End If %></b></font>

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.