2 Replies Latest reply on Jun 4, 2014 4:15 PM by 71hv

    Format given date from Date Picker to convert into quarter and year


      Still getting used to Livecycle and not attempting to make a effort at learning Javascript at the same time. I'm was attempting to work on a form in ES4 that would use the following formula to convert a date that someone selects from a date picker to then convert that date to show MM/YYYY in a new field. I would appreciate it if anyone has a couple of seconds to take a look at this and tell me what I'm missing to make this work.





      form1.#subform[0].DateField2::calculate - (JavaScript, client)



      form1.#subform[0].DateField3::calculate - (JavaScript, client)

      var date = new Date(DateField1.rawValue);

      var month = date.getMonth()+1;

      var year = date.getFullYear();

      if (DateField1.rawValue == null)




      if (month<=03)  month="03";

      if (month<=06)  month="06";

      if (month<=09)  month="09";

      if (month<=12)  month="12";

      this.rawValue = month+"/"+date.getFullYear();