mvleonc
12th March 2003, 19:39
Hi!

I need to obtain the date of the day Monday of one week of the year. For example date of the day Monday of week number 2: 06/enero/2003

Exists in Baan a function that does this?

Thanks.

:confused:

lbencic
12th March 2003, 20:24
So..you know which week? Use week.to.num function.

long week.to.num(long weekno, long.yearno, long week_dayno)

The long it returns is a Baan Date number. For your example:



returned.date = week.to.num(2, 2003, 2)



** assumes Sunday as your first day of the week.

NPRao
12th March 2003, 20:52
You can check the first day of the week using - rdi.first.day.of.week() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_runtime_dictionary_information_rdi_first_day_of_week)