Solved

oracle date question

Posted on 2012-04-05
4
408 Views
Last Modified: 2012-06-21
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
Comment
Question by:anumoses
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 74

Expert Comment

by:sdstuber
ID: 37814017
>>> Does not work.

why not?  what happens? error? no results? wrong results? keyboard catches fire?
0
 
LVL 74

Accepted Solution

by:
sdstuber earned 250 total points
ID: 37814028
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
 
LVL 6

Author Comment

by:anumoses
ID: 37814060
I tried to_date,

cursor stays on the field. No error message displayed
0
 
LVL 6

Author Closing Comment

by:anumoses
ID: 37814129
thanks
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question