?
Solved

oracle date question

Posted on 2012-04-05
4
Medium Priority
?
410 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 1000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
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.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Suggested Courses

764 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