1. Michael Hartnett
  2. PowerServer Mobile (Obsolete)
  3. Friday, 12 October 2018 09:11 AM UTC

Hi All,

Not sure if this has been asked before, but struggling to find direction on what to do.

Is there a way to determine the Language & Region and therefore the Date & Time format used on a mobile device using Powerserver Mobile.

We have an app that needs to be deployed for users within a global organisation that have operations in Europe, Asia, The Middle East & The US.

In certain parts of the App we construct dates from selected Month and Year options, but I need a way to construct the complete date in the correct regional format,

i.e. id_curr_date = date(string(li_day) + '/' +string(li_month) +'/'+ String(year) )

Naturally this format will work in Europe, but US and some other regions expect something like the following;

i.e. date(string(li_month) + '/' +string(li_day) +'/'+ String(year) )

Can Appeon determine the Device settings or do I need to do this some other way?

Thanks in advance

Michael

Accepted Answer
Marco Meoni Accepted Answer Pending Moderation
  1. Friday, 12 October 2018 09:29 AM UTC
  2. PowerServer Mobile (Obsolete)
  3. # Permalink

Hi Michael,

by default, Mobile apps depend on globalisation settings of the application server (e.g. in the web.config file for MS IIS).

If you rely on string variables to represent dates by day, month and year concatenation, my opinion is that it is a no go.

I would instead use date variables and set them by the Date ( year, month, day ) syntax.

Then use date arguments in DataWindows or E-SQL and let the DB drivers to handle the values.

My 2 cents.

.m 

 

Comment
There are no comments made yet.
Michael Hartnett Accepted Answer Pending Moderation
  1. Friday, 12 October 2018 11:12 AM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 1

Thanks Marco,

That worked.  I was overthinking the issue, when I should have just let the device handle the date creation.

Many Thanks

Michael

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.