on 12-08-2004 10:02 AM
Hi everybody!
I want to setup the date format like the settings of the local machine. Unfotunately the format of the Simple Type element which is taken over from an existing Model element is different.
Think I can set the Fomat by the IWDResourceHandler interface but how can I get the format of the locale machine?
Bye Markus
Hi Markus,
which local machine do you mean? As long as your Web Dynpro application will run in a single server, there might be something like a local machine (and Detlev's suggestion will work, sorry Detlev, old buddy). But if there is a cluster of servers where each single server instance might have it's own date format, the result will depend on which one you are currently "talking with".
What kind of model is the simple type from?
Best regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefan,
> if there is a cluster of servers where each single
> server instance might have it's own date format,
Huaaaa...
> the result will depend on which one you are
> currently "talking with".
"Ladiiies & Gentlemeeen,
I don't know how you arrange your cluster environment - anyhow, I would offer you a 'china east - us west - southafrica'-mixed locale-cluster for only 1 penny!"
... that's why one shouldn't take the cheapest, ye know
Best regards
Detlev
Hi Markus,
from the user you can retrieve the locale (user.getLocale(), see http://media.sdn.sap.com/html/submitted_docs/60_sp2_javadocs/ume/com/sap/security/api/IUser.html#get... and then almost like before: DateFormat df = SimpleDateFormat.getDateInstance(int style, Locale aLocale) with style as you like, FULL, LONG, MEDIUM, or SHORT (see JavaDoc).
Hope it helps
Detlev
Hi Markus,
DateFormat df = SimpleDateFormat.getDateInstance();
See http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
Hope it helps
Detlev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.