Total number of weeks in year

mikzielinski
Level 1
Total number of weeks in year

Hi all,

How can I get a number of weeks in the year based on date?

0 Kudos
2 Replies
Liev
Dataiker Alumni

Hi @mikzielinski 

Just to confirm I understand correctly. Are you looking for:

  1. The number of weeks in a year, given a year as a parameter? This would be equivalent to asking whether a year is a leap year.
  2. Given a date, compute the week within the year that that date falls on. This would return an integer.

Let me know!

 

0 Kudos
mikzielinski
Level 1
Author

I manage to get this,

From the date I got the current week number, then I created a fake date on last week of the year. After that, I subtracted them and got weeks until the end of year ๐Ÿ™‚