Skip to main content
Announcements
Jan 15, Trends 2025! Get expert guidance to thrive post-AI with After AI: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
drohm002
Creator II
Creator II

if statement with last month

Hi, I have a field called AMS_DATE, I want to create a field inside of my script that returns a value of '1' if AMS_DATE occurred last month.  Please help!

1 Reply
edwin
Master II
Master II

in your load statement add this (make sure AMSDATE is a date

load ...
if(monthstart(AMS_DATE) = addmonths(monthstart(today()),-1),1)  as YOURFLAG,
...