<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: MVEL + update + specific date : Update a date field to a specific date? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/mvel-update-specific-date-update-a-date-field-to-a-specific-date/m-p/314377#M1378</link>
    <description>&lt;P&gt;Hello Me,&lt;/P&gt;
&lt;P&gt;I found this things:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The java object for Date is java.util.Calendar&lt;/LI&gt;
&lt;LI&gt;The class that is used for Fn.calendar is org.nuxeo.ecm.automation.features.PlatformFunctions.calendar(java.util.Date) but it's not needed there&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;This is the code that I did :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;java.util.Calendar cal= java.util.Calendar.getInstance(java.util.Locale.getDefault()) ;
//warning calendar month starts at 0 (=JANUARY), 1(=FEBRUARY)...
cal.set(2999, 11, 31);
WorkflowVariables["birthDate"]=cal;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Info about calendar:=&amp;gt; result is 2999-12-31&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
System.err.println(format.format(cal.getTime()));
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 25 Apr 2013 14:35:07 GMT</pubDate>
    <dc:creator>milonette_</dc:creator>
    <dc:date>2013-04-25T14:35:07Z</dc:date>
    <item>
      <title>MVEL + update + specific date : Update a date field to a specific date?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/mvel-update-specific-date-update-a-date-field-to-a-specific-date/m-p/314376#M1377</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I would like to know how to update a date field to a specific date as
12-12-2014 ?&lt;/P&gt;
&lt;P&gt;I try to use MVEL fn.date() but failed...&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2013 11:47:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/mvel-update-specific-date-update-a-date-field-to-a-specific-date/m-p/314376#M1377</guid>
      <dc:creator>milonette_</dc:creator>
      <dc:date>2013-04-25T11:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: MVEL + update + specific date : Update a date field to a specific date?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/mvel-update-specific-date-update-a-date-field-to-a-specific-date/m-p/314377#M1378</link>
      <description>&lt;P&gt;Hello Me,&lt;/P&gt;
&lt;P&gt;I found this things:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The java object for Date is java.util.Calendar&lt;/LI&gt;
&lt;LI&gt;The class that is used for Fn.calendar is org.nuxeo.ecm.automation.features.PlatformFunctions.calendar(java.util.Date) but it's not needed there&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;This is the code that I did :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;java.util.Calendar cal= java.util.Calendar.getInstance(java.util.Locale.getDefault()) ;
//warning calendar month starts at 0 (=JANUARY), 1(=FEBRUARY)...
cal.set(2999, 11, 31);
WorkflowVariables["birthDate"]=cal;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Info about calendar:=&amp;gt; result is 2999-12-31&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
System.err.println(format.format(cal.getTime()));
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Apr 2013 14:35:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/mvel-update-specific-date-update-a-date-field-to-a-specific-date/m-p/314377#M1378</guid>
      <dc:creator>milonette_</dc:creator>
      <dc:date>2013-04-25T14:35:07Z</dc:date>
    </item>
  </channel>
</rss>

