Hi Lisa,
You could use the following to test if your current day/time is before or after september of the current year:
if [%BeginOfCurrentDay%] < addMonths(trimToYears([%BeginOfCurrentDay%]),9) then
2018
else
2019
Cheers,
John
The function dateTime returns a string. Which tripped your first attempt.
For clarity first use activity CreateVariable to get
$StartOfNextCollegeYear = addMonths(trimToYears([%BeginOfCurrentDay%]),9)
Then get the current collegeYear via:
if [%BeginOfCurrentDay%] < $StartOfNextCollegeYear then
$HuidigJaar β 1
else
$HuidigJaar
I used:
if [%CurrentDateTime%] < parseDateTime(toString($HuidigJaar)+ '-09-01', 'yyyy-MM-dd')
then $VorigJaar
else if [%CurrentDateTime%] > parseDateTime(toString($HuidigJaar) + '-08-31', 'yyyy-MM-dd')
then $VolgendJaar
else empty
and that works! If someone has a better practice for me, please let me know!