Ir para conteúdo

Arquivado

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

DiogoRbx

sqlserver - oracle

Recommended Posts

;) Bom sei que isto é um coisa bem besta... sai de um projeto em ORACLE nele tem o date(data,' expressão ')como é o do SQLSERVER

Compartilhar este post


Link para o post
Compartilhar em outros sites

Pegar Data Corrente "Getdate()"Pegar Mes Corrente Month(GetDate())Pegar Dia Corrente Day(GetDate())Pegar Ano Corrente Year(GetDate())Existe tambem a hipótese de Detepart("Expressao",Data)Mas creio que os exemplos acima são mais simples e dão o mesmo resultado.

Compartilhar este post


Link para o post
Compartilhar em outros sites

vamos lá cara.....No Sql para mostrar as datas em um formato diferente nos temos a função CONVERTO Problema é que são instruídas por um códigoEu sei somente alguns, os quais eu utilizo..Então faça testes do tipoPrint Convert(Varchar(10),GetDate(),103)Print Convert(Varchar(10),GetDate(),108)Print Convert(Varchar(10),GetDate(),110)Print Convert(Varchar(10),GetDate(),112)Print Convert(Varchar(10),GetDate(),101)Print Convert(Varchar(10),GetDate(),102)FaloW!!!!!!

Compartilhar este post


Link para o post
Compartilhar em outros sites

Datepart Abbreviations year yy, yyyy quarter qq, q month mm, m dayofyear dy, y day dd, d week wk, ww weekday dw hour hh minute mi, n second ss, s millisecond ms

DATEPART ( datepart , date ) ceto mais ele só pegar um, dia, mes ou ano no date do oracle converter o campo do banco = 12/22/2003 para date(campo ,'dd/mm/yyyy') para 22/12/2003

Compartilhar este post


Link para o post
Compartilhar em outros sites

vamos lá cara.....No Sql para mostrar as datas em um formato diferente nos temos a função CONVERTO Problema é que são instruídas por um códigoEu sei somente alguns, os quais eu utilizo..Então faça testes do tipoPrint Convert(Varchar(10),GetDate(),103)Print Convert(Varchar(10),GetDate(),108)Print Convert(Varchar(10),GetDate(),110)Print Convert(Varchar(10),GetDate(),112)Print Convert(Varchar(10),GetDate(),101)Print Convert(Varchar(10),GetDate(),102)FaloW!!!!!!

Compartilhar este post


Link para o post
Compartilhar em outros sites

Como seria para busca apenas o ano no Firebird?

Pegar Data Corrente "Getdate()"Pegar Mes Corrente Month(GetDate())Pegar Dia Corrente Day(GetDate())Pegar Ano Corrente Year(GetDate())Existe tambem a hipótese de Detepart("Expressao",Data)Mas creio que os exemplos acima são mais simples e dão o mesmo resultado.

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.