Buscar

Pegando data, dia, ano e mes corrente no firebird

Código

select

current_date as DATA,

extract(month from current_date) as MesCorrente,

extract(day from current_date) as DiaCorrente,

extract(year from current_date) as AnoCorrente,

(case extract(month from current_date)
    when 1  then 'Janeiro'
    when 2  then 'Fevereiro'
    when 3  then 'Março'
    when 4  then 'Abril'
    when 5  then 'Maio'
    when 6  then 'Junho'
    when 7  then 'Julho'
    when 8  then 'Agosto'
    when 9  then 'Setembro'
    when 10  then 'Outubro'
    when 11  then 'Novembro'
    when 12  then 'Dezembro'
end) as DescricaoMes,


from rdb$DATABASE
 

Publicidade

Vote na dica




Quantidade de votos: 0 votos
Aceitação: 0%


Detalhes da dica

Categoria: Banco de dados
Adicionada dia: 19/05/10
Por: Marcos Fernando Barbosa
Visualizada: 9661 vezes

Planeta Delphi - Tudo sobre programação Delphi Planeta Delphi - www.planetadelphi.com.br - Todos os direitos reservados | Copyright 2001-2009