943,669 Members | Top Members by Rank

Ad:
  • Oracle Discussion Thread
  • Unsolved
  • Views: 2593
  • Oracle RSS
Sep 25th, 2008
0

I need the logic behind date syntax

Expand Post »
Can someone let me know how the date syntax work. example working with "greatest" 01-oct-02 and 20-may-2003, it accept 20-may-2003 to be the greatest instead of 01-oct-02 which the oldest (greatest) can someone explain this to me. please let me know the logic behind. I have alot of problems with this.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sunny101 is offline Offline
4 posts
since Sep 2008
Sep 25th, 2008
0

Re: I need the logic behind date syntax

You Have to use Date Fromat To_Date
('20-may-2003','dd-mon-yyyy') and to_date('01-oct-2002','dd-mon-yyyy')
and you find between this greatest.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
yogesh_vaidya12 is offline Offline
11 posts
since Oct 2007
Sep 26th, 2008
0

Re: I need the logic behind date syntax

You Have to use Date Fromat To_Date
('20-may-2003','dd-mon-yyyy') and to_date('01-oct-2002','dd-mon-yyyy')
and you find between this greatest.
thank you for your support, but i tried the syntax you sent to me, it will only show the appearance of the date dd mm yy.

when oracle tries to compare the two date to see the one that is oldest, because one have to come before the other everyone it is known that '01-oct-2002' will come first before '20-may-2003' just a mere look. But oracle does not work like that, it works differently try comparing the dates using the greatest function. you see what i am talking about. i want to know the logic.
Last edited by sunny101; Sep 26th, 2008 at 1:09 am.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sunny101 is offline Offline
4 posts
since Sep 2008
Dec 10th, 2008
0

Re: I need the logic behind date syntax

why can't you use 'least' function to get the oldest(Greatest) date.....
your requirement is to get Greatest(Oldest) date right?,So you can use "least" function instead of "greatest" function..........
I think it will help you ..........................
Reputation Points: 10
Solved Threads: 0
Newbie Poster
like_to_learn is offline Offline
9 posts
since Dec 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Oracle Forum Timeline: problem list item
Next Thread in Oracle Forum Timeline: Oracle console stucks





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC