Ir para conteúdo

POWERED BY:

Arquivado

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

morfel

montrar aniverdario tipo orkut

Recommended Posts

tenho o seguinte cogido que eu ja fiz:

 

dia = ?

mes = ?

ver_dia = rs("dia")

ver_mes = rs("mes")

 

if ver_dia = dia and ver_mes = mes then

aqui nostra a data e nome

end if

 

o grande problema e que no dia e mes não estou conseguindo relacionar com day() e month(), não esta fazendo a consulta correta. conto com o apio seus para resolver este probleminha.

Compartilhar este post


Link para o post
Compartilhar em outros sites

<%

dia = day(now())

mes = month(now())

 

ver_dia = rs("dia")

ver_mes = rs("mes")

 

if ver_dia = dia and ver_mes = mes then

aqui mostra a data e nome

end if

 

%>

Compartilhar este post


Link para o post
Compartilhar em outros sites

é basicamente isso mesmo

 

SELECT REGISTRO FROM TABELA WHERE DAY(DATA) = DAY(NOW) AND MONTH(DATA) = MONTH(NOW)

Compartilhar este post


Link para o post
Compartilhar em outros sites

claro qeu esta é so um exemplo tem que arrumar

 

como esta fazendo no seu codigo

Compartilhar este post


Link para o post
Compartilhar em outros sites

AGORA DEU CERTO, FIZ UMA GAMBI AQUI MAIS FUNCIONA..

 

OLHA O CODIGO AI. E GANBIARRA MESMO

if day(date) = "1" then

diaoi = "01"

end if

if day(date) = "2" then

diaoi = "02"

end if

if day(date) = "3" then

diaoi = "03"

end if

if day(date) = "4" then

diaoi = "04"

end if

if day(date) = "5" then

diaoi = "05"

end if

if day(date) = "6" then

diaoi = "06"

end if

if day(date) = "7" then

diaoi = "07"

end if

if day(date) = "8" then

diaoi = "08"

end if

if day(date) = "9" then

diaoi = "09"

end if

if day(date) = "10" then

diaoi = "10"

end if

if day(date) = "11" then

diaoi = "11"

end if

if day(date) = "12" then

diaoi = "12"

end if

if day(date) = "13" then

diaoi = "13"

end if

if day(date) = "14" then

diaoi = "14"

end if

if day(date) = "15" then

diaoi = "15"

end if

if day(date) = "16" then

diaoi = "16"

end if

if day(date) = "17" then

diaoi = "17"

end if

if day(date) = "18" then

diaoi = "18"

end if

if day(date) = "19" then

diaoi = "19"

end if

if day(date) = "20" then

diaoi = "20"

end if

if day(date) = "21" then

diaoi = "21"

end if

if day(date) = "22" then

diaoi = "22"

end if

if day(date) = "23" then

diaoi = "23"

end if

if day(date) = "24" then

diaoi = "24"

end if

if day(date) = "25" then

diaoi = "25"

end if

if day(date) = "26" then

diaoi = "26"

end if

if day(date) = "28" then

diaoi = "28"

end if

if day(date) = "29" then

diaoi = "29"

end if

if day(date) = "30" then

diaoi = "30"

end if

if day(date) = "31" then

diaoi = "31"

end if

 

if month(date) = "1" then

mesoi = "01"

end if

if month(date) = "2" then

mesoi = "02"

end if

if month(date) = "3" then

mesoi = "03"

end if

if month(date) = "4" then

mesoi = "04"

end if

if month(date) = "5" then

mesoi = "05"

end if

if month(date) = "6" then

mesoi = "06"

end if

if month(date) = "7" then

mesoi = "07"

end if

if month(date) = "8" then

mesoi = "08"

end if

if month(date) = "9" then

mesoi = "09"

end if

if month(date) = "0" then

mesoi = "10"

end if

if month(date) = "11" then

mesoi = "11"

end if

if month(date) = "12" then

mesoi = "12"

end if

 

ver_dia = rs("dia")

ver_mes = rs("mes")

 

if ver_dia = diaoi and ver_mes = mesoi then

Compartilhar este post


Link para o post
Compartilhar em outros sites

que é isso

 

ta ruim

 

faça apenas

 

Dia = RIGHT("0" & DAY(NOW))

Mes = RIGHT("0" & MONTH(NOW))

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.