|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
how do I filter the time field in oracle
I have a table
Schedule ------------ id int mydate date starttime date endtime date What I actually required is the mydate (18-Jan-2004), starttime( 05:00 pm), endtime (06:00 pm). I am storing the data as follow: mydate 18-Jan-2004 12:00:00 AM starttime 18-Jan-2004 05:00:00 PM endtime 18-Jan-2004 06:00:00 PM Is there a better way to store these information? Say I current machine time (not the server time) is 04:00 PM and I would like to use this information to find id which starttime is later than 04:00 PM. Should I use to_date or is there a better way to construct the SQL statement? Thank you. |
|
#2
|
|||
|
|||
|
Have you tried using the `interval 'n' ` function?
where current_date > sysdate + interval '4' hour; |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > how do I filter the time field in oracle |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|