← servoy magazine

[Tip] Calculate a week number

  • Tips

by Harjo Kompagnie
www.directict.nl

In Servoy you don't have a function like getWeek() to calculate a weeknumber or something like that.

The following example shows you how to retrieve the weeknumber in a calculation:

//referencedate is the column!
return parseInt(utils.dateFormat(referencedate, 'w'));

Hope it helps,

Harjo