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();
to make this work the field that shows the quarters cannot be a date field.
You should use a text field instead.
form11.#subform.Textfield1::calculate - (FormCalc, client) if (not DateField1.isNull) then var vDate = Date2Num(DateField1.formattedValue, "MM/DD/YYYY") var vMonth = Num2Date(vDate, "M") var vYear = Num2Date(vDate, "YYYY") var vQuarter if (Within(vMonth, 1, 3) eq 1) then vQuarter = "03" elseif (Within(vMonth, 4, 6) eq 1) then vQuarter = "06" elseif (Within(vMonth, 7, 9) eq 1) then vQuarter = "09" else vQuarter = "12" endif $ = Concat(vQuarter, "/", vYear) else $ = null endif