I have this field code that works fine:
Code:
{ SET xM{ = { DOCVARIABLE dt1 \@ M}} }{ SET xMM{ = { DOCVARIABLE dt1 \@ MM}} }{ SET xY{ = { DOCVARIABLE dt1 \@ yyyy}} }
{ QUOTE { SET Delay 1 } { SET m { =MOD({ xMM }+Delay+11;12)+1 } }{ SET y { =INT({ xY }+(Delay+{ xM }-1)/12) } } “{ m }-{ y }” \@ “MMMM/yyyy” }
But I want to define a variable to repeat the field elsewhere in the document, saving space / lines (no need to repeat this long field code).
I tried this:
Code:
{ SET xDate{={ QUOTE { SET Delay 1 } { SET m { =MOD({ xMM }+Delay+11;12)+1 } }{ SET y { =INT({ xY }+(Delay+{ xM }-1)/12) } } “{ m }-{ y }” \@ “MMMM/yyyy” }}}
{ xDate \@ “MMMM/yyyy” }
But this returns an error: unexpected end of formula.
Thanks in advance