4 Replies Latest reply on Jan 2, 2012 1:57 PM by ros

    The ISO week

      Title

      The ISO week

      Post

      I'm just a simple user and just yet starting with Filemanager Pro

      Searching for a solution tot change the US week in ISO week (startting at monday instead of sunday) I ran into a solution: 

      http://help.filemaker.com/app/answers/detail/a_id/3160/kw/ISO

      Because it does not work I wonder if it has anything to do with the dat notation on my system: ddmmyyyy?

      And if it is, is there another solution without changing the notation?

      Secondly: Is it possible that US_Week (calculation, date result) = WeekOfYear(Date) has to be:US_Week (calculation, Number result) = WeekOfYear(Date) 

      I look forward to an answer thanks in advance!

      Regards, Rob

        • 1. Re: The ISO week

          Hi Rob,

          the article you point to does give you the correct information, but made it a bit hard to find the essential formula:

          WeekOfYearFiscal( Date , 2 )

          This will give you the ISO-weeknumber. (The date must be an actual date)

          • 2. Re: The ISO week

            Hi Menno

            Thanks for your comment. 

            That does it. Many thanks and best wisches!

            Regards Rob

            • 3. Re: The ISO week
              Sorbsbuster

              Sometimes week number isn't enough.  For example, finding week 40 will find week 40 in every year.  And specifying the year doesn't help, and sometimes the date (eg: 1/1/1993 ) will return the correct week (week 53) but it is classed as being in 1992, so adding a year to the search criteria doesn't work.

              I use this to generate at 'fully'qualified' week number, in the format YYYY-WW

              ---------------

              / Substitute the correct date field for MyDateField in the Let function

              Let (

              [ Date = MyDateField ] ;

              If (

              WeekOfYearFiscal ( Date ; 2) > 51 and Month ( Date ) = 1 ;

              Year ( Date ) - 1 ;

              If ( WeekOfYearFiscal ( Date ; 2) = 1 and Month( Date ) = 12 ; Year( Date ) + 1; Year( Date ) )

              )

              & "-" &

              Right ( "0" & WeekOfYearFiscal ( Date ; 2 ) ; 2 )

              )

              • 4. Re: The ISO week

                Also many thanks for this supplement and again the very best wishes

                Regards Rob