WeekNum function?

x13

Nov 9, 2016
76
1
Netherlands
Hi all.

I'm trying to write a function to get the week number based on a date.
Like in Exce's WeekNum function.

Except I don't need the date serialised, juste a simple %@WeekNum[%mydate] variant.

Any ideas?
Thanks.
 
May 29, 2008
565
4
Groton, CT
Use Charles Dye's ISO8601 plugin, and try something like this
Code:
function weeknum=`%@word["-./W",1,%@dateconv[%1,5]]`
.
If you don't use . or / or - as your date separator, put that between the quotation marks with the capital W.