AnsweredAssumed Answered

Datetime in Alfresco

Question asked by spilby on Dec 3, 2010
Latest reply on Dec 3, 2010 by spilby
Hi everyone,

I want to upload a custom property to Alfresco like this:

Utils.createNamedValue(Constants.createQNameString(Constants.NAMESPACE_CONTENT_MODEL, ArchivoConstants.BIRTHDAY_DATE), my_date);

But this property is a Datetime, not a String, and when I want to obtain this property give me a Java exception when I parse the date.

When I see in Alfresco Node Browser the created or modified dates of the nodes, these have the property type: {http://www.alfresco.org/model/dictionary/1.0}datetime. For example:

Name -> {http://www.alfresco.org/model/content/1.0}created   

Value -> Fri Nov 26 10:10:35 CET 2010

Property Type -> {http://www.alfresco.org/model/dictionary/1.0}datetime   

Value Type ->

But my properties have this Properties:

Name -> {http://www.alfresco.org/model/content/1.0}birthday_date   

Value -> Wed Dec 01 17:46:09 CET 2010
   
Property Type ->

Value Type -> {http://www.alfresco.org/model/cmis/1.0/cs01}id

What can I do tp upload the property type of datetime with a Java method? Like the createNamedValue or createQNameString.

Thanks!

Outcomes