Newbies mushroom Posted November 19, 2015 Newbies Posted November 19, 2015 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
GisMo Posted November 19, 2015 Posted November 19, 2015 Did you try the Custom Data Formatting option in the Data Tab in the Inspector?
comment Posted November 19, 2015 Posted November 19, 2015 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. 1
Newbies mushroom Posted November 20, 2015 Author Newbies Posted November 20, 2015 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
comment Posted November 20, 2015 Posted November 20, 2015 Some things are missing from your description: What do you have selected under File > File Options… > Text? 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 ]
Newbies mushroom Posted November 20, 2015 Author Newbies Posted November 20, 2015 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.
Recommended Posts
This topic is 3558 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 accountSign in
Already have an account? Sign in here.
Sign In Now