jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ard Schrijvers <a.schrijv...@onehippo.com>
Subject Re: xpath query problem
Date Fri, 16 Jul 2010 12:26:07 GMT
Hello Ahmed,

you can also use it like it is used in jackrabbit:

Calendar value = ... ;

"xs:dateTime('"+org.apache.jackrabbit.value.ValueFactoryImpl.getInstance().createValue(value).getString()
+ "')";

Regards Ard

On Fri, Jul 16, 2010 at 2:17 PM, Ahmed Elshereay <AElshereay@idc.com> wrote:
> Hi,
>
> I found how to get an XML date format in java, here's the way:
>
> GregorianCalendar cal = new GregorianCalendar(2010, Calendar.JULY, 15, 15,
> 29, 17);
> XMLGregorianCalendar xmlCal = DatatypeFactory.newInstance
> ().newXMLGregorianCalendar(cal);
>
> Then...
>
> xs:dateTime('" + xmlCal.toXMLFormat() + "')
>
>  Thank you Alex.

Mime
View raw message