#2 date(' ', ,'c') does not work

closed
Mark Hessling
None
5
2012-08-13
2001-09-14
Anonymous
No

Mark,
I got this error report when using c as the third date
parm:

C:\>a:\xx.rexx
7 *-* outfile= 'C:\gashee'
>L> "C:\gashee"
9 *-* datex = date("c") /* number of days since
century start */ - 8 /*
less eight days */
>L> "c"
>F> "623"
>L> "8"
>O> "615"
10 *-* datey = translate(changestr(' ',date
("n",datex,"c"),''))
>L> " "
>L> "n"
>V> "615"
>L> "c"
10 +++ datey = translate(changestr(' ',date
("n",datex,"c"),''))
Error 40 running "A:\XX7663~1.REX", line 10: Incorrect
call to routine
Error 40.28: DATE argument 3, option must start with
one of "BDENOSU"; found "c"

C:\>

I used b instead and all was OK.

I think this is a bug? I am using release 2.2

Kev

Discussion

  • Mark Hessling
    Mark Hessling
    2001-10-02

    Logged In: YES
    user_id=86185

    I have transfered this to a feature request. It is not a
    bug in that this feature is not part of the ANSI standard;
    it is an Object Rexx enhancement.

     
  • Mark Hessling
    Mark Hessling
    2001-12-14

    • assigned_to: nobody --> rexx
     
  • date(' ', ,'c') does not work - ID: 461572

    According to the manual the parameters to date is:
    1) Output format
    2) The date
    3) Input format

    The 'C' you have stated as the 3.rd parameter is the INPUT format.
    In this case the empty string being the input date, this is the wrong format,Dateis expecting a number.
    What do you mean by doing this call ?

    Don't you mean to have the current date as the OUTPUT format ?
    This should be the call:
    date('C ')
    which works

    Terje Nilsen

     
  • Mark Hessling
    Mark Hessling
    2012-08-13

    The original response was incorrect. The format of date conversion IS an ANSI feature. What isn't is the C date format type. This used to be in the Rexx language (just as the first argument) in Rexx language level 3.5. It is no longer in the Rexx language and will not be part of the date conversion functionality.

     
  • Mark Hessling
    Mark Hessling
    2012-08-13

    • status: open --> closed