Update with Date, Time, Minute, Second

Dúvidas, dicas e truques de SQL, Select, Update, Delete, cláusulas, operações com joins, Funções em SQLs, etc
Post Reply
Marlon Pasquali
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 28
Joined: Mon, 20 Mar 2006 3:40 pm
Location: Erechim - RS

Personal I need to record in fields Date of a table The date in the format 'DD / MM / YY HH: MI: SS'.

I tried to do the instruction below but I could not:




Someone can help me,

Thanks

Marlon
gilbertoca
Rank: DBA Sênior
Rank: DBA Sênior
Posts: 372
Joined: Tue, 24 Jan 2006 3:33 pm
Location: Palmas - TO
Contact:

Select all

 
select TO_CHAR(sysdate, 'DD/MM/YY HH24:MI:SS') from dual 
Gilberto
Marlon Pasquali
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 28
Joined: Mon, 20 Mar 2006 3:40 pm
Location: Erechim - RS

Thanks for the Tip Gilberto. Select all right. It works anyway. As I actually needed to make a variable dates update I was able to solve the problem with the following instruction:

Select all

update ra_customer_trx_all set last_update_date = to_date('20/04/02 20:30:15','dd/mm/yy hh24:mi:ss') where trx_number = '306758'
Valeu,

Thanks


Marlon
: Wink:
HaroldoBG
Rank: Estagiário Júnior
Rank: Estagiário Júnior
Posts: 1
Joined: Thu, 30 Nov 2006 2:20 pm
Location: SP

Select all

update  
loja_endereco_cartao 
set dt_finals_ljc = TO_DATE('29/11/2006 18:10:01', 'DD/MM/YYYY HH24:MI:SS') 
where id_cartao_crt = 1548635
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests