Hi,
to make this work the field that shows the quarters cannot be a date field.
You should use a text field instead.
form11.#subform[0].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