5 Replies Latest reply on Oct 30, 2013 1:58 AM by kpg

    week number - day number



      week number - day number


           Hi all

           I need help  with working with dates.

           I need to apply calculations based on dates but ... I use date in format: year, week number, day number

           How to prepare, define fields with data to be able to proceed calculation (deducting usually).

           In excell I have prepared 4 differend filds for that :YEAR, WEEK, DAY, Date (date fild was calculation to conwert those 3 numbers to a 'normal date'.

           But mayby in File maker is any easier way. Any way to define fild in a way that program will 'see it' as a date with possibility of making calculations?

           Thanks for all help


        • 1. Re: week number - day number


               Firstly make sure that your date fields are defined as type 'date', then yes FM will interpret that data as dates; and in Inspector, you can set how that data is displayed; but I'm not sure what you mean by normal when referring to YEAR, WEEK, DAY - that certainly isn't a 'normal' way of presenting a date.

               but there are a number of useful date functions that you can use in calculation fields, so that when you're entering a calculation, refer to the drop down of functions to determine which will work for you

               and you will most likely need to trial a combination to arrive at your desired result


          • 2. Re: week number - day number

                 Ok, I explained that in a wrong way ...

                 How should i CREATE a field that needs to be treated as a DATE if I use date in format: Year.WeekNo.Dayofweek

                 Exemple: 2013.27.2 (year. week no 27. 2=tuesday)

                 Should I have 3 different fields (year, week, day) and 4 that will make some kind of calculation ... ?


                 Is there other way to have my way of writing date but visible for FM as a date?


            • 3. Re: week number - day number

                   Separate fields for each value does sound like a way to simplify this but:

                   Can you explain "week no" a bit more? If January 1 falls on a Saturday. Is that day the only day of week number 1 with the following Sunday the first day of week number 2?

              • 4. Re: week number - day number

                Exemple: 2013.27.2 (year. week no 27. 2=tuesday)

                     Is it the 02/07/2013 ( where 07 is july )? ( I believe that you are not living in USA, because in USA 2 = monday )
                     If so you could start with a custom function like this: http://www.briandunning.com/cf/1568
                • 5. Re: week number - day number

                       Once again

                  44.3.2013 = week 44, Wednesday, year 2013 = 30 October 2013 (Monday as a 1st day of week)

                       How to define a field, where I typing number above and fileMaker will see that as Date and I will be able to make calculations on it. 


                       I Found: http://www.briandunning.com/cf/1379 but I do not know how to use it!