[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: [Input Statement and Oracle Date Format dd-mmm-yyyy]



Hi !!

Well, your problem is occuring at the SQR level, so the ALTER SESSION command
might not help much.
If you are using the input statement, you can set up the mask or the format
parameter to enter the date. This will help YOU specify how the user has to
input ..... use this :

  input $period_end_dt type = date 'Enter Period End Date (DD-MON-YYYY)'
        format='DD-MON-YYYY'

that should do the trick!

Cheers!!
Vishal.


owner-sqr-users@list.iex.net wrote:
I have an sqr which requires a date as a parameter.  I want to use a 4-digit
year in this date.  

My input statement looks like this:
  input $period_end_dt type = date 'Enter Period End Date (DD-MON-YYYY)'

I do include the setupdb.sqc which contains the following:
#ifdef ORACLE
Begin-SQL
ALTER SESSION SET NLS_DATE_FORMAT='DD-MON-YYYY'
End-SQL
#endif

When I execute the sqr, it compiles and asks me for the date.  After entering
30-NOV-1998,  I get the following error:

(SQR 2509)  Incorrect.  Format for date: DD-MON-YY

Question:  How can I use the date option on the input command and get it to
recognize dates in the format DD-MON-YYYY?


____________________________________________________________________
More than just email--Get your FREE Netscape WebMail account today at http://home.netscape.com/netcenter/mail