finding the week containing the first friday of the month

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

jbonanca
Posts: 33
Joined: Mon Dec 06, 2010 1:49 pm

finding the week containing the first friday of the month

Postby jbonanca » Tue Nov 26, 2019 8:09 am

If I am working with a weekly workfile, is there a way to code for a sample that contains all weeks containing the first friday of the month?

EViews Matt
EViews Developer
Posts: 583
Joined: Thu Apr 25, 2013 7:48 pm

Re: finding the week containing the first friday of the month

Postby EViews Matt » Tue Nov 26, 2019 11:33 am

Hello,

I believe the following will accomplish what you requested:

Code: Select all

smpl if @datepart(@date + @mod(12 - @datepart(@date, "W"), 7), "DD") <= 7

jbonanca
Posts: 33
Joined: Mon Dec 06, 2010 1:49 pm

Re: finding the week containing the first friday of the month

Postby jbonanca » Tue Nov 26, 2019 12:14 pm

thank you!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests