Searching with datetime fails

If you perform a search using datetime and receive an InvalidAttributeVaule 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 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.

Terms of use | Feedback
(C) Copyright IBM Corporation 2005. All Rights Reserved.
IBM virtual member manager 6.1