Searching with datetime fails

If you perform a search using datetime and receive an InvalidAttributeValue exception, it might be caused by a datetime format that is not valid in xpath.

The create operation accepts a java Date object in the format yyyy-MM-dd'T'HH:mm:ss. However, after being set in the Eclipse Modeling Framework (EMF), the format is changed to yyyy-MM-dd'T'HH:mm:ss.SSS. Note the addition of milliseconds. If you search using datetime in the yyyy-MM-dd'T'HH:mm:ss format, the search fails.

If you call a get method, you get the datetime in the yyyy-MM-dd'T'HH:mm:ss.SSS format. The search needs to be based on the get-returned format and set in xpath.()

In general, to search on datetime, the format needs to be yyyy-MM-dd'T'HH:mm:ss.SSS.


Icon that indicates the type of topic Concept topic

Terms and conditions for documentation | Feedback


Timestamp icon Last updated: March 30, 2016 13:35
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=vmm&topic=searchingwithdatetimefails
File name: searchingwithdatetimefails.html