4 Replies Latest reply on Mar 21, 2010 11:40 AM by jonnyt

    UK and USA Date formatting

    jonnyt

      Title

      UK and USA Date formatting

      Post

      I started a database for a client using a customer management template.

       

      We are based in the UK.

       

      When the system displays a date field it show correctly in UK format DD/MM/YYYY

       

      I have a calculation that uses that is used to input an entry in a description field

       

      e.g.

      "Date Entry Added" & Get(CurrentDate)

       

      When you display the contents of the field it displays as "Date Entry Added 02/30/2010"- in usa format.

       

       

      Is there any way of forcing UK date formats across the entire database? I have encountered serveral problems with dates with this system that Ive been developing for a client.

        • 2. Re: UK and USA Date formatting
          jonnyt

          This is strange, I have done all this already. If I create a script with

           

          Show Custom Dialog ---> Get(CurrentDate) - it displays 21/02/2010 in UK format.

           

           

          BUT I have a script calculation as follows:-

           


          Case (
          // below is used if the item does not have a last billed date - then bill for the days elapsed
          IsEmpty(Bookings::lastBilledWeekly) and IsEmpty(Bookings::lastBilledMonthly); ( "Part invoice amount for: " &   (Get(CurrentDate)-Bookings::Start Date)  & " Days." & Bookings::Start Date &" to "  & Get(CurrentDate) & " | Booking Ref: "  & Bookings::bookingID)  & "   "  & Get ( CurrentDate );

           

          // below is used if the item is weekly and has a last billed date
          (Upper(Bookings::billingSchedule)="WEEKLY" and (Length(Bookings::lastBilledMonthly)>1));  ( "Part invoice amount for: " &   (Get(CurrentDate)-Bookings::lastBilledWeekly)  & " Days. " &
          Bookings::lastBilledWeekly & " to " & Get(CurrentDate) & " | Booking Ref: "  & Bookings::bookingID)  & "   "  & Get ( CurrentDate );

           

          // below is used if the item is monthly and has a last billed date
          ((Upper(Bookings::billingSchedule)="MONTHLY") and (Length(Bookings::lastBilledMonthly)  > 1));  ( "Part invoice amount for: " &   (Get(CurrentDate)-Bookings::lastBilledMonthly)  & " Days. " & Bookings::lastBilledMonthly & " to " &  Get(CurrentDate) & " | Booking Ref: "  & Bookings::bookingID  & "   "  & Get ( CurrentDate ));

           

          // is weekly and no last billed date
          ((Upper(Bookings::billingSchedule)="WEEKLY") and (IsEmpty ( Bookings::lastBilledWeekly ))); ( "Part invoice amount for: 7 Days. " & (Get(CurrentDate)-7) & " to " & Get(CurrentDate) & " | Booking Ref: "  & Bookings::bookingID)  & "   "  & Get ( CurrentDate );

           

          // is monthly and no last billed date
          ((Upper(Bookings::billingSchedule)="MONTHLY") and (IsEmpty ( Bookings::lastBilledMonthly ))); ( "Part invoice amount for: 28 Days. " & (Get(CurrentDate)-28) & " to " & Get(CurrentDate) & " | Booking Ref: "  & Bookings::bookingID)  & "   "  & Get ( CurrentDate );


          "")

           

           

           

          With this script all the date display oin USA format MM/DD/YYYY

           

          Why would this be happening in one script and not another?


          • 3. Re: UK and USA Date formatting
            jonnyt

            just teste don a very simple script calculation to build a string

             

            "Date is: " & Get(CurrentDate) - produces USA format date 03/21/2010

             

            "hello: " & Get(CurrentDate) - produces Uk format date 21/03/2010

             

             

            Why is this happening?

            • 4. Re: UK and USA Date formatting
              jonnyt

              ok, i tried Saving A copy of the databae - but this gave the same results when running the test scripts.

               

              If I save the file as a clone and then run the tests script they both display in UK Format.

               

              However, a clone has no records in it and to import the current database records will be nearly impossible, the database has 60+ tables and how can i be sure everything will be intact even if I import all 60 tables individually??

               

              Or is there a way to import ALL data from ALL the tables?