

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to change Date format based on Country?
HI all,
I am attempting to change(set) the date format for my App based on the Country Code in our data base using the following code in the data load editor:
If $(vCountry) = 'CA' then
Set DateFormat = 'D/M/YYYY';
Else
Set DateFormat = 'M/D/YYYY';
End If;
vCountry is set earlier in my script when the country code is loaded.
I keep getting the following error:
Unexpected token: '=', expected one of: '(', 'ZTestw_z', 'OPERATOR_PLUS', 'OPERATOR_MINUS', 'not', 'bitnot', 'LITERAL_NUMBER', ...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be try this like this...
If '$(vCountry)' = 'CA' then
Set DateFormat = 'D/M/YYYY';
Else
Set DateFormat = 'M/D/YYYY';
End If;
Although this might fix the error, I am not sure if this is actually going to work or not... I will be curious to know if it does work in setting different DateFormats based on Country


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No Joy. Still got the same error. Thanks for the suggestion tho!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How is vCountry set? Can you share the script for that


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sure, here you are:
gra_plant_setup:
let vCountry = peek([Plant Country];
LOAD
PLANT_SETUP_KEY,
PLANT_CODE,
PLANT_NAME,
[Plant Country],
[Days Till Due]
WHERE EXISTS(PLANT_SETUP_KEY);
