Jump to content

Changing date format


This topic is 3051 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hi,

Can anyone help?

I'm using the script below and after adding to the DB it has altered the date format ( payment date) to US MM/DD/ YY style.

Case (
IsEmpty ( PaymentMethod ) ; " Invoice Status" ; TextStyleAdd ( PaymentStatus & " " & payment date ; Bold)  & ¶  & TextSize ( PaymentMethod ; 10 ) ; PaymentStatus  & "  "  & payment date  & ¶  & TextSize ( " "  & PaymentMethod; 12 )      )

How can I get this back to UK DD/MM/YY?

I've tried using the Inspector and my original date fields used elsewhere on the layout are unchanged. I've put it on the layout as <<payment info popover>>  (borrowed from the Starter solution- Invoice) 

Thanks

Tony

Screen Shot 2015-11-10 at 16.00.06.png

Screen Shot 2015-11-10 at 16.01.20.png

Link to comment
Share on other sites

1 hour ago, mushroom said:

it has altered the date format ( payment date) to US MM/DD/ YY style.

What do you mean by "altered"? When was it different? To me, it sounds like your file is set to use the MM/DD/YYYY format. If your system is using a different format, set the file to 'Always use current system settings' (under File > File Options… > Text). Or - preferably - clone the file and import your data into the clone.

  • Like 1
Link to comment
Share on other sites

  • Newbies

HI Gizmo and Comment,

Thanks to  both of you.

Tried those already...

The system is set to DD/MM/YY. Just odd that when only used in the script, the 'payment date' field has reverted to US style. I copied the script from Starter solution which was also DD/MM/YY format. Would it have corrupted 'en route' as the Starter solution was probably created in US style? All other date files are fine.

Much head scratching....

BTW am using FM14

Link to comment
Share on other sites

Some things are missing from your description:

  1. What do you have selected under File > File Options… > Text?
  2. You keep talking about a script, but you show us a calculation field (at least that's what it looks like).

Another thing to check:

  • Enter Layout mode;
  • Select the text block where you field is merged;
  • In inspector > Data > Data formatting, select Format: [ As entered ]

 

 

Link to comment
Share on other sites

  • Newbies

Hi Comment,

Ok it's a calculation.

This is it from the Starter solution which I borrowed showing UK date in the screenshot below.

Case    (
    IsEmpty ( Method ) ; "Set Payment Status" ;
    $$PLATFORM = "Desktop" ; TextStyleAdd ( Status & "    " & Date Payment ; Bold )  & ¶ & TextSize ( Method ; 12 ) ;
    Status & "    " & Date Payment & ¶ & TextSize ( "    " & Method ; 16 )
    )

My version is:

Case (
IsEmpty ( PaymentMethod ) ; " Invoice Status" ; TextStyleAdd ( PaymentStatus & " " & payment date ; Bold)  & ¶  & TextSize ( PaymentMethod ; 10 ) ; PaymentStatus  & "  "  & payment date  & ¶  & TextSize ( " "  & PaymentMethod; 12 )      )

It's the 'payment date' field that's reverted/ changed. Starter calls it 'Date Payment'

I attach screenshots from Starter and File options for help .

Appreciate your time.

Screen Shot 2015-11-20 at 11.12.35.png

Screen Shot 2015-11-20 at 11.09.04.png

Link to comment
Share on other sites

This topic is 3051 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.