Solved

oracle date question

Posted on 2012-04-05
4
407 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

733 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