DATE FORMAT

Tools & Utilities
Enthusiast

DATE FORMAT


i m trying to retrieve the max value from the field which contains data like FEB2006,MAR2006, etc... From these data i have to select the max value. Can you please help me out with this ASAP.
2 REPLIES
Junior Contributor

Re: DATE FORMAT

Hi Ajai,
you can cast that column to a date:

SELECT
MAX(my_col (DATE, FORMAT 'mmmyyyy')) (CHAR(7))
FROM my_tab;

Dieter
Enthusiast

Re: DATE FORMAT

hi dieter..

thanks for the reply.. my problem is solved now.. :-)