Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I have to create a date spawn from 20000101 to last date in current year and month(period) 3
My result have to be: 20130331
I have year field and a period field to get data from, but i don't have the last date in the month (period)
I how can i assign this value to a variable "LastDateInPeriod)?
GunnarSchie
If you want to create the variable in the script you can use
SET vMyLastdateofMonth = monthend(makedate(MyYear, MyMonth));
You can also create the variable in the Variable Overview window by clicking on the Add button and entering a name for the variable. After you've created the variable select it in the Variables list and then enter the expression in the Definition box.
Remember to replace MyYear and MyMonth with the field names of your document.
This should do the trick: monthend(makedate(MyYear, MyMonth)). Replace MyYear and MyMonth with your field names.
Hallo Gysbert
Thank's for fast answer! How do I assign this to a variable?
Like this?
vMyLastdateofmonth = monthend (makedate (MyYear, MyMonth))
GunnarSchie
If you want to create the variable in the script you can use
SET vMyLastdateofMonth = monthend(makedate(MyYear, MyMonth));
You can also create the variable in the Variable Overview window by clicking on the Add button and entering a name for the variable. After you've created the variable select it in the Variables list and then enter the expression in the Definition box.
Remember to replace MyYear and MyMonth with the field names of your document.