on 07-28-2010 10:04 AM
Dear Experts,
In my webdynpro application I have a requirement where I have to use a 24 hr time format, but by default it is shown as 12 hr format, because of the language in portal.
And I only want to change the format in this application only, not of all the portal.
Please suggest.
Warm Regards,
Upendra Agrawal
Hi Upendra,
For this, In the local dictionary of the application, create a simple data type of built in type Time, and select the represantation format as HH:mm:ss. Create a new context attribute with this data type. Set you context element to this type.
Thanks and Regards,
Shyam.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Upendra,
Assign the value from backend to the newly created attribute of type new simple type. This will convert it to the 24 hrs format
OR
if you get the date from backend,
Try using a date formatter.
String s;
Format formatter;
Date date = // Your date value from the backend.
formatter = new SimpleDateFormat("HH.mm.ss");
s = formatter.format(date);
This will give the time in 24 hrs in the variable 's'.
Pls try this and let me know.
Thanks and Regards,
Shyam.
Edited by: Shyam Gopal on Jul 28, 2010 3:05 PM
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.