first, week.2 interval won't give you the first Wedn of the specified month.
By default, Sunday will be the strating point. so Week.4 will return the
Here is a working sample:
INTNX( 'week.4',current_date,2 );
put wed date9.;
you can put the date conversion statement into the INTNX function.
On 12/7/06, MCI <firstname.lastname@example.org> wrote:
> Hi guys, just can't figure this out:
> Suppose I have 100 rows of data, rows are such as:
> "MAR99", "MAR02", "DEC03", etc.
> How to convert for example, "MAR99" to the first wednesday
> in March 1999, which is, "1999-03-03"?
> I think the following code can give the first wednesday of the same
> month as current_date, which could be any day in March 1999, but
> how do I convert "MAR99" to current_date?
> wed = INTNX( 'week.2', intnx('month', current_date, 0) - 1, 3)
> Thanks a lot, appreciate it!