Skip to main content
Nintex Community Menu Bar
Question

Week Number formula

  • Jun 27, 2024 8:55 PM UTC
  • 3 replies
  • 8 views
  • Translate All

Forum|alt.badge.img+1

This is likely something obvious that I am overlooking, but how do you write a formula to get a week number from a date?

3 replies

Forum|alt.badge.img+1

I don’t see an easy method. You may have to get the date value of January 1st of the year of your target date, Then subtract that from your target date, then divide by 7 and round down.

Translate

Forum|alt.badge.img+1
  • Author
  • Known Participant
  • Jun 27, 2024 10:38 PM UTC

Thank you, I decided to calculate the value in a database query and load the value as a model so I can reference it. It isn’t the most elegant solution, but it works.

Translate

Forum|alt.badge.img+1
  • Inspiring
  • Jun 27, 2024 10:38 PM UTC

Sorry for not getting back to you sooner. Our “FormatDate” formula function gets you started with this concept. But it doesn’t have a “Week Number” option. (We’re gonna fix that). But you can derive week number from day number divided by 7…

So a formula might look like this:

ROUND(FORMAT_DATE(“oo”, NOW())/7)

For more details about this look at our Skuid.Time documentation

Translate