cancel
Showing results for 
Search instead for 
Did you mean: 

MDM Time field looses 12 hours - why ?

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

resolved in MDM next SP

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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?