Hello!
I have a data set where I would like to have a new field which changes based on the status of another field.
Ideally, I have a product and when the product is completed, a completion date is provided e.g. 6/23/2022. I want a field that tells me whether the completion date falls within the current month i.e. all products that complete in June will say Yes and all others will say No. And when we move to July, same thing all over again. June products move to No and July completed products will be Yes.
I know there is a Date time Month but I do not know how to construct this. And I hope I have provided enough detail to summarize the outcome desired.
Thanks!
Solved! Go to Solution.
Hey @ZoeM, will your dates always be in that format i.e. mm/dd/yyyy? If so, you can use this:
IF DateTimeTrim(DateTimeParse([Date],'%m/%d/%Y'), 'month')
= DateTimeTrim(DateTimeToday(),'month') THEN 'YES' ELSE 'NO' ENDIF
Or:
IF DateTimeMonth(DateTimeParse([Date],'%m/%d/%Y'))
= DateTimeMonth(DateTimeToday()) THEN 'YES' ELSE 'NO' ENDIF
It'll always be dynamic due to the DateTimeToday() function. Workbook attached!
Use a formula like this.
if datetimemonth([DateTime_Out]) = DateTimeMonth(DateTimeToday())
then "YES"
else "NO"
endif
If you are looking for both current month and year then this formula:
if (datetimemonth([DateTime_Out]) = DateTimeMonth(DateTimeToday())
&& DateTimeYear([DateTime_Out]) = DateTimeYear(DateTimeToday()))
then "YES"
else "NO"
endif
Hello, You can use a summary tool to set the max and min date for the current month (make sure to create a formula tool to set the calculation). The summary tool will create max date and min date within the month so you can set a logic that if it falls within min and max month it's "yes" else "no".