7 Replies Latest reply on Sep 28, 2009 8:45 AM by aematt

    Filemaker Date format

    eekamouse

      Title

      Filemaker Date format

      Post

      is there any method of automatically inserting a date so that it is actually entered (not displayed) as mm/dd/yyyy

       

      I need to ultimately export a date in the following format yymmdd manipulated by a calculation based on a date field (where the date is actually entered)

       

      using the Insert Current Date step inserts m/d/yyyy which becomes problematic when the months and days become two digits instead of 1

       

      I need the month to be consistantly entered as 01 for January as opposed to 1 and same for the day or I  need a complicated case of nested if statement

       

      Any ideas

       

      sweating bullets

        • 1. Re: Filemaker Date format
          comment_1
            

          The date is entered in the short-date format that is set in your OS or in the file (when created/cloned, the file inherits the formats from the OS).

           

          If all you need is to export the date in a specific format, you can format the field to display in that format, and specify 'Apply current layout's data formatting…' when exporting.

           

           

          A calculation is not that complicated either: 

           

          SerialIncrement ( "000000" ; 10000 * Mod ( Year ( Datefield ) ; 100 ) + 100 * Month ( Datefield ) + Day ( Datefield ) )

          • 2. Re: Filemaker Date format
            eekamouse
              

            Just so everyone doesnt think I am being a leach I have come up with a possible solution using:

             

            Length ( Month ( date_real) ) and Length ( Day ( date_real ) )

             

            where date_real is the date as inserted via script

             

            I can speficy an output using left,middle and right functions based on whether the length function returns 1 or 2 digit values for the day and month, so 3 possible permuatations.

             

            This is for printing on laser cheques in Canada so I will post my finished solution when done.

             

            If anyone has a more economical way of doing it I would love to hear 

            • 3. Re: Filemaker Date format
              eekamouse
                

              wow now that was economical :) thanks I never new that

              • 4. Re: Filemaker Date format
                enyko
                  

                Hey guys,

                 

                I found this post because it looks like the problem I'm having. Unfortunately, I can't understand the solution. I need to create a calculation that pulls two-digit year, month and day (in that order). When I use "month" or "day" in my calculation though, it still comes across as one character. I was able to pull the two-digit year by using the "Right ( text ; numberOfCharacters )" function. I have my dates formatted 00/00/0000 and I have adjusted my OS to be formatted the same.

                 

                How can I have my day & month be stored as two characters?

                 

                Thanks! 

                • 5. Re: Filemaker Date format
                  raybaudi
                    

                  Hi enyko

                   

                  the comment's formula makes exactly what you want.

                  • 6. Re: Filemaker Date format
                    enyko
                      

                    Ah...BEAUTIFUL!

                     

                    Thanks Daniele! 

                    • 7. Re: Filemaker Date format
                      aematt
                         Nice.