[Building Sakai] ContentEntity Date Format

Steve Swinsburg steve.swinsburg at gmail.com
Mon Feb 8 01:46:23 PST 2010


Do you mean one of the properties you can retrieve from the Entity, ie PROP_CREATION_DATE for example?

If so, it's a String so you can use SimpleDateFormat to convert String to Date.

 eg
String dateStr = "08/02/2010";
DateFormat df = new SimpleDateFormat("dd/MM/yyyy");
Date date = df.parse(dateStr);       

remembering Exceptions and Locales.

cheers,
Steve



On 08/02/2010, at 6:09 PM, Matt Hoyt wrote:

> Does anyone know how to convert the date in ContentEntity property to a 
> Java date?
> 
> -- 
> Matt Hoyt
> 
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> 
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3823 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20100208/cfb0da31/attachment.bin 


More information about the sakai-dev mailing list