1 Reply Latest reply on Oct 9, 2012 12:47 AM by Sorbsbuster

    Convert WEEK and YEAR fields data into a DATE

    NilsMortenAlexandersen

      Title

      Convert WEEK and YEAR fields data into a DATE

      Post

           Hello

           I have a DB with separate field for WEEK NR. and YEAR. This is a DB for "work shifts", and where the WEEK NR and YEAR fields contains just a number (i.e.week 12, year 2012)

           I am looking for a method to convert these two numbers into a proper date, that can be included in serches and be sorted.
           The date should be Monday of  that week (if possible, but not absolutely critical)

           Hope someone can help me :-)

           Nils.. curently on FMP 10

        • 1. Re: Convert WEEK and YEAR fields data into a DATE
          Sorbsbuster

               You could back up one step, and modify the script that creates the weekly records.  It could check for the Monday date of the current week, convert that date into a week number (as per the script), then create the necessary records, as per the script; except that you could create the series of weeks by adding 7 on to the starting Monday.  The you could trap the year, the week number, and the date.