Home » Developer & Programmer » Forms » date problem
date problem [message #224149] Tue, 13 March 2007 04:57 Go to next message
rzkhan
Messages: 345
Registered: March 2005
Senior Member
The following throws an error. Unable to perform query...

set_block_property('attendance',default_Where,'a_date<15-APR-2007');
execute_query;


I will appreciate if the error is identified.

Thanks
RzKhan
Re: date problem [message #224169 is a reply to message #224149] Tue, 13 March 2007 06:03 Go to previous messageGo to next message
rzkhan
Messages: 345
Registered: March 2005
Senior Member
The error has been corrected..as

set_block_property('attendance',default_Where,'a_date<''16-APR-2007'';


Thank you All
Re: date problem [message #224170 is a reply to message #224149] Tue, 13 March 2007 06:05 Go to previous messageGo to next message
sachin_svaidya
Messages: 15
Registered: March 2006
Location: Mumbai
Junior Member

Try this, this will work.

set_block_property('attendance',default_Where,
'a_date<'||''''||'15-APR-2007'||'''');
execute_query;



Sv.
Re: date problem [message #224174 is a reply to message #224169] Tue, 13 March 2007 06:11 Go to previous message
Littlefoot
Messages: 20894
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Although it works at the moment, it is not the way to do it. 15-APR-2007 is not a date. It is a string. Sooner or later, you'll get into trouble if you keep doing this. Use TO_DATE function to explicitly tell Oracle what to do with your string - convert it to date!
Previous Topic: Error closing Excel file generated using OLE2
Next Topic: problem with calling reports from Forms
Goto Forum:
  


Current Time: Mon Dec 05 10:45:10 CST 2016

Total time taken to generate the page: 0.05653 seconds