Page 1 of 1

Date picker format

Posted: Thu Nov 19, 2015 11:26 am
by esdaled
How do you recommend that we handle different date formats for different groups of users?

We are working on implementing a solution to allow users in different countries to use different date formats (e.g. d/m/y or m/d/y).

Our rich display files contain date fields (referencing a 6,0 numeric field) and using field formatting of Number with an Edit Word of ' / / '. Our RPG programs set the values (and work with the values) of date fields based on the job's DATFMT. When a user job is started the startup job sets the DATFMT based on their application profile which indicates the country in which they work (and the associated date format).

This works fine except that the date picker always returns the date in a mm/dd/yy format. We have tried changing the PC's region and language setting, but this did not effect the format returned by the date picker.

How can we set the format returned by the date picker?

Re: Date picker format

Posted: Thu Nov 19, 2015 2:06 pm
by Scott Klement
You can either set the format by setting the 'locale' (in the binding dialog) or by setting the default date pattern described at the following link
http://www.profoundlogic.com/docs/displ ... te+Pattern

Re: Date picker format

Posted: Thu Nov 19, 2015 2:25 pm
by esdaled
If I set the 'locale' (in the binding dialog) won't it apply to all users. I would like to have users in some countries see the date as m/d/y while users in other countries see the date as d/m/y. In the RPG, I am formatting the date (numeric 6,0) based on the job's date format which is set when a user signs on. How can I sync the value the date picker drops in the field with the job format (i.e. tell the date picker to use m/d/y or d/m/y).

The link you provided requires me to sign into confluence, so I can't view the information on the default date pattern. If my default was m/d/y, how would I change it for a specific session to d/m/y?

Re: Date picker format

Posted: Thu Nov 19, 2015 3:28 pm
by Scott Klement
Sorry about that, you should be able to view the link, now.

It requires Profound UI 5.1.0 or higher, but should be exactly what you need.

Re: Date picker format

Posted: Thu Nov 19, 2015 5:14 pm
by esdaled
The default date pattern looks like what we want.

I will upgrade to the latest release this weekend and try it.

Thanks.