3 Replies Latest reply on Dec 27, 2010 2:06 PM by RickWhitelaw

    Failure to maintain date formatting

    RickWhitelaw

      Title

      Failure to maintain date formatting

      Post

      Hi,

      I'm using FMPA 11 on Mac OSX 10.6.5. I've just encountered an annoying problem that I've traced back to when I updated from FMPA 10 to 11. I have a text field auto-entered by calculation. It concatenates a five digit  field and a date field. The date field is formatted to include leading zeroes for day and month, year is four digits, and "/" is the separator. This has always generated a fifteen character string. Since FMPA11 the leading zeroes are not showing up in the resulting field. "FORUM01/02/2011" is now coming up "FORUM1/2/2011". The zeroes ARE in the date field. This has worked perfectly for years. So, a calculation that worked fine as GetAsDate(Right(PROD_DAT;10)) must now be  GetAsDate(Middle(PROD_DAT;6;10)) for it to evaluate correctly if the field is 13 or 14 characters long. 

          Am I missing something here?

      RW

        • 1. Re: Failure to maintain date formatting
          philmodjunk

          What expression are you using? (Since you are on Mac, this may be a platform specific issue also.)

          When I launch FMP 10 on windows XP and use either of these two auto-entered calculations:

          name & GetAsText ( Date )

          or

          name & Date

          Where name is a text field and Date is a date field, I don't get any leading zeroes unless I manually type them into the date field. I get identical results for Filemaker 11.

          • 2. Re: Failure to maintain date formatting
            RickWhitelaw

            The expression for auto-entering the concatenated field is "production_name::PROD_SHNM& Engagement_End". "PROD_SHNM" is a five character text field. "Engagement_End" is a Date field. The date formatting for "Engagement_End" is working correctly, either by typing it in or via a drop-down calendar. When the concatenation happens, the leading zeroes vanish. I've also tried GetAsText(Engagement_End) with identical results. My System default is also MM/DD/YYYY. "Always use file's saved settings" is checked in File Options to allow for the solution to be accurate on a machine with different system defaults.

            RW

            • 3. Re: Failure to maintain date formatting
              RickWhitelaw

              Found the problem: using a drop-down calendar doesn't work as I expected, even though the date LOOKS to be correct. That was just layout-level formatting. The date DOES have to be typed in.

              RW