• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 416
  • Last Modified:

oracle date question

filtration_start     date ( format - MM/DD/RRRR HH24:MI)

04/05/2012 14:24

filtration_end     date ( format - MM/DD/RRRR HH24:MI)

04/05/2012 15:30 changed this to 04/05/2012 13:10

I need to make sure end_filtration is > start_filtration

if :filtration_end < :filtration_start then
  msgbox.show('Error', 'Filtration End date has to be greater than Filtration Start date.', 'OK');
raise form_trigger_failure;
End if;

Does not work. Need help.
0
anumoses
Asked:
anumoses
  • 2
  • 2
1 Solution
 
sdstuberCommented:
>>> Does not work.

why not?  what happens? error? no results? wrong results? keyboard catches fire?
0
 
sdstuberCommented:
are your fields actually dates or just strings that are human-readable as dates?

if they are dates then your if condition is correct
if they are strings, then convert them to dates when you compare them

if to_date(:filtration_end,'MM/DD/RRRR HH24:MI') < to_date(:filtration_start,'MM/DD/RRRR HH24:MI') then
0
 
anumosesAuthor Commented:
I tried to_date,

cursor stays on the field. No error message displayed
0
 
anumosesAuthor Commented:
thanks
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now