Complex IF/AND statement with a date range
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi everyone!
I am really stuck on how to perform a complex IF statement that involves a date range and was wondering if anyone could help. I have tried both ways (below) but I receive "formula warnings" with each way and both produce null values in my data output. I am trying to make the workflow so that if a date is in a certain range, then it performs a specific calculation. Any ideas on how to achieve this?
IF [Cost x Rate]=0 AND [Depreciation Method]="STL" AND ([Date Placed In Service]>=2017-07-30 AND [Date Placed In Service]<=2017-08-26) THEN ([Cost]/36)*12 Elseif
[Cost x Rate]=0 AND [Depreciation Method]="STL" AND [Date Placed In Service] IN(2017-08-27,2017-09-30) THEN ([Cost]/36)*11 Elseif.....
Thanks in advance!
Solved! Go to Solution.
- Labels:
- Date Time
- Error Message
- Preparation
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Amehok,
A pair of quotes is needed for date values.
For example:
[Date Placed In Service]>='2017-07-30'
if you would like to check if the date field is within 2017-08-27 and 2017-09-30:
[Date Placed In Service] >= '2017-08-27' and [Date Placed In Service] <= '2017-09-30'
if you would like to check if the date field is equal to 2017-08-27 or 2017-09-30:
[Date Placed In Service] in ( '2017-08-27', '2017-09-30')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you so much for your help! This worked wonderfully!
