Re: DATE QUESTION

From: Saad Ahmad <sahmad_at_mfa.com>
Date: 1995/07/19
Message-ID: <3ujhfq$2bq_at_homer.alpha.net>#1/1


STANLEY C. STINES (SCS_at_ornl.gov) wrote:
> How do I let the user enter in a text field a date format of 122395 (mmddyy)
> and be able to verify that field is a valid date and display back into the
> field the format 12/23/95? This sounds simple enough but the TO_CHAR,
> TO_DATE, FORMAT MODELS and all other things I have tried do not work. I would
> like to have a simple procedure to do this so that a multitude of forms can
> Dumb Stan

select to_char(to_date(:your_entry, 'mmddyy'), 'MM/DD/YY') into :sql_to_display_var
from dual;

and trap the exception to mean that entry was invalid.

--
**************************************************************
*                          Saad Ahmad                        *
*                          E-Mail: sahmad_at_mfa.com            *
**************************************************************
Received on Wed Jul 19 1995 - 00:00:00 CEST

Original text of this message