to_timestamp()
Devi usare to_timestamp() per convertire la tua stringa in un corretto timestamp valore:
to_timestamp('12-01-2012 21:24:00', 'dd-mm-yyyy hh24:mi:ss')
a_data()
Se la tua colonna è di tipo DATE (che supporta anche i secondi), devi usare to_date()
to_date('12-01-2012 21:24:00', 'dd-mm-yyyy hh24:mi:ss')
Esempio
Per inserirlo in un where condizione utilizzare quanto segue:
select *
from TableA
where startdate >= to_timestamp('12-01-2012 21:24:00', 'dd-mm-yyyy hh24:mi:ss')
and startdate <= to_timestamp('12-01-2012 21:25:33', 'dd-mm-yyyy hh24:mi:ss')
Nota
Non hai mai bisogno di usare to_timestamp() su una colonna di tipo timestamp .