Home » Developer & Programmer » Forms » select all record of date between 01-jan-2015 to 30-mar-2015 and time shift a(6:59:59 am to 1:59:59) (10g form)
select all record of date between 01-jan-2015 to 30-mar-2015 and time shift a(6:59:59 am to 1:59:59) [message #638841] Tue, 23 June 2015 01:02 Go to next message
abrarkiit
Messages: 5
Registered: May 2015
Location: India
Junior Member

I have problem with time excract from sysdate.
have 2 textbox one for from_date and one for To_date and another combo is chose for shift.(A-7:59:59 to 1:59:59)
prblem-- display all record between from date and to_date and shift
Re: select all record of date between 01-jan-2015 to 30-mar-2015 and time shift a(6:59:59 am to 1:59:59) [message #638842 is a reply to message #638841] Tue, 23 June 2015 01:08 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
between from date and to_date and shift


Please read again what you wrote and explain does this mean.

Re: select all record of date between 01-jan-2015 to 30-mar-2015 and time shift a(6:59:59 am to 1:59:59) [message #638848 is a reply to message #638842] Tue, 23 June 2015 09:04 Go to previous messageGo to next message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
I'm with Michel, I don't understand what you are asking. However, if you need to select data between a range - look at the BETWEEN operator.

Craig...
Re: select all record of date between 01-jan-2015 to 30-mar-2015 and time shift a(6:59:59 am to 1:59:59) [message #638849 is a reply to message #638842] Tue, 23 June 2015 09:05 Go to previous message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Here's the general idea:
select *
from your_table
where (     date_column between :from_date and :to_date
       and :combo = 'not shift'
      )
   or
      (     date_column between :to_date and :from_date
       and :combo = 'shift'
      )
Previous Topic: FRM-41213: Unable to connect to the report server <server name>.
Next Topic: Execute Data using When validate Record trigger
Goto Forum:
  


Current Time: Thu Apr 18 22:58:22 CDT 2024