Update with Date, hour, minute, Second

Dúvidas, dicas e truques de SQL, Select, Update, Delete, cláusulas, operações com joins, Funções em SQLs, etc
  

Poston Thu, 20 Jul 2006 2:04 pm

People need to write to a table to date fields date in the format ' dd/mm/yy hh: mi: ss '.

I tried the below but found I could not: update table set last_update_date = (to_char (' 7/20/06 20:30:15 ', ' dd/mm/yy hh24: mi: ss ')) where note = ' 306758 ' can someone help me, thanks Marlon
Marlon Pasquali
Location: Erechim - RS

Poston Fri, 21 Jul 2006 9:27 am

Code: Select all
select TO_CHAR sysdate (, ' DD/MM/YY HH24 MI SS : : ' ) from dual
Gilberto
gilbertoca
Location: Palmas - TO


Poston Fri, 21 Jul 2006 9:41 am

Thanks for the tip Gilberto. The select OK. Works anyway. As in fact I needed to do an update of variable dates I managed to solve the problem with the following: update ra_customer_trx_all set last_update_date found = to_date (' 4/20/02 20:30:15 ', ' dd/mm/yy hh24: mi: ss ') where trx_number = ' 306758 ' thanks, thanks Marlon: wink:
Marlon Pasquali
Location: Erechim - RS

Poston Thu, 30 Nov 2006 2:21 pm

update loja_endereco_cartao set dt_finals_ljc = TO_DATE (' 11/29/2006 18:10:01 ', ' DD/MM/YYYY HH24: MI: SS ') where id_cartao_crt = 1548635
HaroldoBG
Location: SP


  • See also
    Replies
    Views
    Last Post


      Return to SQL

      Who is online

      Users browsing this forum: No registered users and 3 guests