on 05-25-2009 7:49 AM
Hi Gurus,
We know Java Web Dynpro displays the date in format of MM/DD/YYYY, however in R/3, ABAP Web Dynpro and BSP the format is MM.DD.YYYY.
We need to synchronise the date in Java WD to MM.DD.YYYY.
Any gurus know how to do it? Is there a setting that can be tweaked either in portal or the WD application itself?
Tried searching the forum with no useful results.
Thank you..
Regards,
Jansen
Edited by: Jansen Low on May 25, 2009 8:49 AM
Hi Jansen,
Please try this.
1) Create a simple type of type date using the dictionary types.
2) Go to the represenation tab and specify the required format may be (yyyy-MM-dd) OR (yyyymmdd).
3) Create a context attribute with datatype as the simple type which you have created.
Now you can use these attribute for your processing. By following this, you need not have to change anything in the code.
I hope this solves your issue. Please revert back in case you require any further information on this. Also You can use the date formatter for this kind of changes in the date formatting option. Please refer to this link as well:
https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/using%252bdate-time%252bformats
Thanks and Regards,
Pravesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
I'm not talking about switching from Month,Day,Year format to Day,Month,Year format.
I want to change the "/" to "." to follow R/3
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the suggestion. But these are done on the WD application level. FOr our case we are doing enhancements of standard WD code.
Want to check if portal itself has any config/setting to default/change the date format.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jansen,
Can you try with this:
There are 2 ways to change date format, one from portal and other one from internet browser.
1) Goto UserAdministration - select user and modify User language to English UK
2) Goto Control Panel - Regional and Language Options and Change Language to English UK.
Try with other lanugae option and check in which language you can get it in desired format. Apart from that I think there is no other option to fulfil this requirement.
You can also try fix this from backend when you are providing the date, provide in the desired format. However this wil require code change from backend which I think you are not intended to do.
I hope that helps!
Thanks and Regards
Pravesh
Hi,
You can do that in this way
Date date1 = new Date("02-24-2009");
DateFormat df = new SimpleDateFormat("dd/mm/yyyy");
String date2 = date1.toString();
Date today = df.parse(date2);
Regards,
H.V.Swathi
Edited by: H.V Swathi on May 25, 2009 9:02 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
9 | |
9 | |
7 | |
7 | |
6 | |
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.