Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Weekdays and dates

Former Member
0 Kudos

hi all,

i have the following two requirements. Please let me know if there are any function modules for the same.

1) I have a From-Date and a To-Date. Within this interval i want to find all the nth days of week. for example for n = 2, i want the dates for all mondays within this period.

2) again for the interval (from-to date) i want the dates on the nth weekdays. for example, for n = 4 and weekday = 2, then i want dates for all 4th mondays of month within the period.

(of course this means that the period will span for more than one month for the second requirement while for the first it can span for more than one week)

regards,

PJ

5 REPLIES 5

Former Member
0 Kudos

Hi,

Try this one

DATE_COMPUTE_DAY Returns day of the week for a particular date(1=Monday, 5=Friday etc.)

DATE_TO_DAY Returns day of the week for a particular date('Monday', 'Friday', 'Sat.')

0 Kudos

Hi,

combine fm <b>WFCS_FCAL_WDAYS_GET_S</b> (get workdays)

and fm <b>DAY_IN_WEEK</b> (nr. of the day)

Andreas

0 Kudos

hey JJS,

Thanx!! ur answer serves well for the first requirement.

Andreas,

i dont think WFCS_FCAL_WDAYS_GET_S is suiting req 2. or m not clear with what its doing? is it returning the number of working days in the specified period? i dont think thats what i require...

could you please explain in detail how u think it can be used?

0 Kudos

sorry PJ,

it's <b>WFCS_FCAL_LUT_CREATE_S</b>

regards Andreas

Former Member
0 Kudos

Hi PJ,

Take a look to SE37 and give DAYS as a search value. You'll get plenty of function modules for handling dates.

Regards,

Ville