0
 Followers
4
 Likes

Add a function to get the week number

On our radar

There are date functions like Year(), Month(), Day(), DayOfWeek()... but no Week() to return the weeknumber. If you want to use the weeknumber in a aggregate you can't. To bad, because then you must use a advanced query and use (SQL Server):

datepart(week, <date>)

Funny thing is, when you look at the executed SQL of an aggregate where you use e.g. Year() as a formula of a custom column, Outsystems rewrites this to:

datepart(year, <date>)


Created on 2 Nov 2017
Comments (1)
2 Nov 2017

Could be useful, but be aware: there are many standards with regards to what the week number for a given date is. I'm not sure whether all database engines implement it the same (probably not).

views
138
Followers
0