Home » SQL & PL/SQL » SQL & PL/SQL » insert sysdate with specific time
insert sysdate with specific time [message #18896] Wed, 20 February 2002 09:41 Go to next message
Trevor Pearson
Messages: 5
Registered: October 2001
Junior Member
I need to insert either sysdate or sysdate+1 into a datetime field, but specify the time. for instance, how would i input today at 5 pm into a date field when I don't know what day today is?

I know I could insert sysdate and then come back and update the time, but does anyone know how to do it with one insert statement?

thanks,

Trevor
Re: insert sysdate with specific time [message #18897 is a reply to message #18896] Wed, 20 February 2002 09:59 Go to previous message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
insert into datetable
values(to_date(to_char(sysdate,'mm/dd/yyyy')||' 17:00:00','mm/dd/yyyy hh24:mi:ss'));
Previous Topic: how do i display which host i am connected to in sql
Next Topic: problem using CURSOR with BETWEEN clause..
Goto Forum:
  


Current Time: Fri Sep 24 04:33:33 CDT 2021