Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I would like to assign a dynamic datetime field values to variables but do not know how to do this (specifically the QV syntax used in the expression) in a macro.
I have 2 variables, "vFromDate" and "vToDate" and would like to assign the values as below
vFromDate = timestamp(daystart(min([Delivery Date (PDT)])),'M/D/YYYY h:mm:ss TT')
vToDate = timestamp(dayend(max([Delivery Date (PDT)])),'M/D/YYYY h:mm:ss TT')
I understand that you can set a variable by using the "Set Variable" action. However I would like to find a way to do this inside a macro.
Any help is appreciated.
Hey Anthony,
I'm thinking this should work:
set v = ActiveDocument.GetVariable("vFromDate")
v.SetContent activedocument.Evaluate("timestamp(daystart(min([Delivery Date (PDT)])),'M/D/YYYY h:mm:ss TT')"),true
I haven't tested it out though so you might have to play around with it a bit.