jojovalenton
23rd April 2019, 09:55
hi,
how can i get the date from and date to by given parameter week number only?

regards,
jojo

tmannais
23rd April 2019, 10:03
Providing some examples and/or expected output would be great for us in order to help you.

BChary
23rd April 2019, 15:35
I think you should use function week.to.num()

long ret1, ret2
ret1 = week.to.num(2, 2019, 1)
ret2 = week.to.num(2, 2019, 7)


Syntax:
function long week.to.num (long weekno, long yearno, long week_dayno)

Description:
This returns the number of days since 01-01-0001 for a specified week number, year number, and day of the week. The day of the week is interpreted by using the day defined as the first day of the week in the user data settings in the data dictionary (see Week handling).

Arguments:
long weekno
long yearno
long week_dayno

Return values:
The number of days since 01-01-0001.
-1 Error. For example, the date is before the year 1 or past the year 9999.

jojovalenton
24th April 2019, 17:15
hi,
thanks. it works.