ltannous
24th September 2004, 00:03
I have a filed timrp010.date (day,month,year). How can I convert this date in my session script to the week number?

Example timrp010.date = 23-09-2004 converts to week 39

tools123
24th September 2004, 01:33
Check this and num.to.week() and related functions.
http://www.baanboard.com/baanboard/showthread.php?t=16484&highlight=week

ltannous
24th September 2004, 06:50
How do I use this in my script??

maxime
24th September 2004, 06:54
Hi,

These two lines of code should do it:

dayno = date.num()
num.to.week(dayno, week_dayno, year_dayno, weekno)

Where week_dayno, year_dayno, weekno are the output arguments.

The weekno will give you the week from the current date.

Maxime