on 07-14-2008 5:20 PM
I get DateTimeValue from MDM, using Java Api RetrieveLimitedRecordsCommand,
it returns correct data-time, except HOUR - it always smaller than 12,
and no AM PM signs is presented at API, as I see (may be wrong).
So, does anybody know how to resolve this problem with Time value ?
Where to get AM PM or 24 hours value ?
http://help.sap.com/javadocs/MDM/SP06P2/com/sap/mdm/valuetypes/DateTimeValue.html
thanks in advance.
resolved in MDM next SP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vladimir,
Try to format the date obtained from MDM:
private static final SimpleDateFormat DATE_FORMAT =
new SimpleDateFormat("ddMMyyyyHHmm"); //HH indicates Hour in day (0-23)
DateTimeValue dateTimeValue = (DateTimeValue) value; //value is the MDMValue retrieved from MDM
date = DATE_FORMAT.format(dateTimeValue.getDate());
Please, refer to SimpleDateFormat class in JAVA API Documentation for more information.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Have you tried with the constants while fetching values
DateTimeValue(java.util.Calendar value, int formatType)
Field Summary
static int DATE_FORMAT_TYPE
static int DATE_TIME_FORMAT_TYPE
static int TIME_FORMAT_TYPE
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
DateTimeValue appears in Record[] array as a result of execution of
RetrieveLimitedRecordsCommand,
so I can not affect FormatType to DateTimeValue .
Please propose another way..
As well I can not find class
com.sap.mdm.valuetypes.format.MdmDateTimeFormatInfo
http://help.sap.com/javadocs/MDM/SP06P2/com/sap/mdm/valuetypes/format/MdmDateTimeFormatInfo.html
which is not exist in a documented namespace,
so I can not try to use it.
how to deal with it now?
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.