Home » Developer & Programmer » Forms » date problem
date problem [message #269937] Tue, 25 September 2007 03:30 Go to next message
fam_bila
Messages: 43
Registered: August 2007
Location: pakistan
Member
how data is selected between two dates
i use this statement in select statement

where date between '2-aug-2007' and '5-sep-2007' 


IN ORACLE IT IS WORKING CORRECT BUT IN DEVELOPER ITS NOT WORKING.

WHT'S THE PROBLEM, CAN ANYONE TELL
THANX
Re: date problem [message #269947 is a reply to message #269937] Tue, 25 September 2007 03:53 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
Did you get a chance to look at OraFAQ Forum Guide?
Quote:
IN ORACLE IT IS WORKING
What do you mean by that? SQL*Plus?
Quote:
BUT IN DEVELOPER ITS NOT WORKING.
I suppose you would get an error. Do you have any problem to post that here?

Anyway, use explicit conversions. I mean use to_date and the format.

By
Vamsi
Re: date problem [message #269984 is a reply to message #269937] Tue, 25 September 2007 05:27 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It is about implicit datatype conversion. You are comparing date with a string. NLS_DATE_FORMAT in your SQL*Plus session is set to 'dd-mon-yy', but Developer Suite doesn't understand it.

Always, always use explicit conversion:
WHERE date_column BETWEEN TO_DATE('02.08.2007', 'dd.mm.yyyy') 
                      AND TO_DATE('05.09.2007', 'dd.mm.yyyy')
Previous Topic: Create DBA Through Form
Next Topic: install Oracle 10g
Goto Forum:
  


Current Time: Fri Sep 27 04:19:20 CDT 2024