on 01-17-2008 9:33 AM
Hi experts,
My webdynpro application is calling a bapi that returns a list of date related items and the problem is that the date format has been changed from dd/mm/yyyy to mm/dd/yyyy.
If i call the bapi directly from R3, the format returned is dd/mm/yyyy.
I want the date format on the webdynpro to stay as dd/mm/yyyy.
Pls help.
Thank you.
Regds,
Daniel
Hi Daniel
Date dateToBeChanged=<your retrived date from BAPI>;
Format formatter = new SimpleDateFormat("dd/MM/yyyy");
String tempDate = formatter.format(dateToBeChanged);
Now in tempDate you will get your desired date's format
Best Regards
Chaitanya.A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Take a look at note 947081. Hope that helps you out.
https://service.sap.com/sap/support/notes/947081
Thanks,
Katan
Hi Poojitha!
Apparently even i had an issue with the date format and i tried your method and it worked!
Thanks!
Regards,
Janice
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Daniel,
1. Create a Simple type under "Dictionaries->SimpleType" called DateFormat
2. Select the type as "date"
3. Go to the "Representation" tab and set the format as "dd/MM/yyyy" (or whatever u want, but month should be MM)
4.Bind the context attribute to the type created now.
Hope this helps u.
Regards,
Poojith MV
Edited by: Poojith M V on May 10, 2010 5:03 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Daniel,
Crreate a date attribute in ur context. format the date , u r getting from the bapi using simpleDateFormatter .
regards
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.