cancel
Showing results for 
Search instead for 
Did you mean: 

Reg: Inserting MDM field of type date

Former Member
0 Kudos

Hi,

I am using MDM java API to insert record into MDM repository. I want to insert a field of type date.

I am using the below code.

newRec.setFieldValue(fields[2], new DateTimeValue(wdContext.currentContextElement().getDOB_personal().));

it is giving me error that the costructor DateTimeValue(Date) is undefined.

Kindly suggest.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Prasanthi,

Try modifying code like this


Calendar c = Calendar.getInstance();
c.setTime(wdContext.currentContextElement().getDOB_personal());
newRec.setFieldValue(fields[2], new DateTimeValue(c));

Ninad

Answers (0)