: 4582 | 108668 | 12353

@WeekNumber - calculate the week number from a specific date 
Use this IdeaSpace to post ideas about Domino Designer.

: 24
: 24
: 0
: Domino Designer
: calendar, week, number, column
: Thorsten Seidel665 21 Jun 2011
:
: / Email
I'm shure, I'm not the first and not the last....
 
I need an @Function to calculate the calendar week of a specific date.
The function should be like @WeekNumber(date; format) with format = [calendar (gregorian, julian, ...) / region / ISO-8601 / etc.].
 
I know, there are a lot of working functions and code samples around, but I think an direkt implementation in the server / client is a lot faster, especially when this is used in view columns.



1) Thorsten Sendler29 (21 Jun 2011)
I support this suggestion!
2) Dirk Stelloh2259 (22 Jun 2011)
can't belive this hasn't been done already! *sigh*
3) Johannes Madsen344 (22 Jun 2011)
In the mean time you can use this formula:

WeekDay := @Weekday(Date);
ThisThurs := @Adjust(Date; 0; 0; @If(Weekday = 1; -3; 5 - Weekday); 0; 0; 0);
Year := @Year(ThisThurs);
Jan1 := @Date(Year; 1; 1);
Jan1day := @Weekday(Jan1);
Week1Thurs := @Adjust(Jan1; 0; 0; @If(Jan1day > 5; 12 - Jan1day; 5 - Jan1day); 0; 0; 0);
1 + (ThisThurs - Week1Thurs) / 604800; REM {Seconds pr. week};

The result of the last formula is the week number of Date
4) Bas van Gestel2808 (04 Aug 2011)
Also add the LS function of course..










:
:




Welcome to IdeaJam


You can run IdeaJam™ in your company. It's easy to install, setup and customize. Your employees, partners and customers will immediately see results.

Use IdeaJam to:

  • Collect ideas from employees
  • Solicit feedback and suggestions from employees and customers
  • Run innovation contests and competitions
  • Validate concepts
  • Use the power of "crowd-sourcing" to rank ideas and allow the best ideas to rise to the top

IdeaJam™ works with:

  • IBM Connections
  • IBM Lotus Quickr
  • Blogs and Wikis
  • Websphere Portal
  • Microsoft Sharepoint
  • and other applications.

IdeaJam has an extensive set of widgets and API's that allow you to extend and integrate IdeaJam™ with other applications.

Learn more about IdeaJam >>






IdeaJam developed by

Elguji Software Logo