Salesforce and other SMB Solutions are coming soon. ×

# Date Range (... not working)

## Recommended Posts

Hi- this seems like it would be a simple question and I can't figure out why it is giving me so much grief. smiley-cry

I am creating a calculation to see if an event date is within a specific range

(example: if it is within 3 months of the date, or 1 months of the date, then this is the result)

I have been trying to use the "..." for range but it keeps saying "This number can not be evaluated"

What am I doing wrong?

##### Share on other sites

For checking if a value is within a date range, use AND to join the two conditions:

if(value ≥ dateStart and value ≤ endDate; result1; result2)

##### Share on other sites

The "..." range is used in Find operations, not in calc functions. (I never before thought about that being a discrepancy).

Myfield = 3/1/1975...11/6/1979

you want a syntax akin to

Myfield ≥ GetasDate ("3/1/1975") and Myfield ≤ GetasDate ("11/6/1979")

##### Share on other sites

Hi- Thank you for your help. Here is what I put in the calculation but I don't think it is coming up with the right results. It should result in yes if the EventDate is less than 3 months but more than 1 month before the EventDate. Right now it only results in NO.

If (

EventDate ≥ (EventDate - 90) and EventDate ≤ (EventDate - 30); "yes"; "no" )

Thank you,

Amanda

smiley-laughing

##### Share on other sites

You're using the same name for the two EventDates you're comparing.

Are they from different tables? Use table notation (Tablename::EventDate).

##### Share on other sites

Hi- I'm actually not comparing two different dates but trying to find out if the one date is within a specific range. The EventDate is just one field.

Thanks,

Amanda

##### Share on other sites

Under what circumstances would ANY date field EVER fail to be greater than or equal to itself minus 90?

Under what circumstances would ANY date field EVER be less than or equal to itself minus 30?

:confused:

That's like saying If 6 is greater than 6 minus 3, do this; if 6 is less than 6 minus 2, do that.

##### Share on other sites

Ok, I think I've just been starring at my computer too long. Opps!

Yes, that doesn't make any sense and of course I would need two different dates (one being the current date) duh!

Amanda

• ### Images

• By Soliant Consulting,
• By Soliant Consulting,
• By Soliant Consulting,
• ### Forum Statistics

• Total Topics
33.7k
• Total Posts
141.6k
×
×
• Create New...