Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Calculated date problem


bigzilla

Recommended Posts

I have a Date Field called “NextService” with the following Calculated value;

 

Case(not IsEmpty(Service Interval); Date( Month(Purchase Date) + Service Interval; Day(Purchase Date); Year(Purchase Date) ))

 

“Service Interval” is a number field

 

“PurchaseDate” is a date field.

 

So if the Purchase date is 10/7/2004 and the Service Interval is 3 (3 months) the date shown in the “NextService” field should be 1/7/2005. But the field reads “ ? “.

 

If I make the Service Interval into a strict (Date)calculation field it works fine and shows the 1/7/2005 date. Do you know what is causing the problem?

 

Thanks,

 

Bill

Link to comment
Share on other sites

One way of doing it is to change NextService to a calculation field type with the calculation:

 

PurachsedDate + Service Interval

 

also change the Calculation results to "Date"

 

Then in Service Interval put in the days between service, e.g., 90 to represent 3 months.

 

Hop this helps.

Bob

Link to comment
Share on other sites

One possibility... in your original post you have Purchase Date in the formula and “PurchaseDate” as the date field. These are not the same, either take the space between Purcahse and Date out of the formula or insert one in the "PurchaseDate" field name.

 

Data from your original post:

Case(not IsEmpty(Service Interval); Date( Month(Purchase Date) + Service Interval; Day(Purchase Date); Year(Purchase Date) ))

 

“Service Interval” is a number field

 

“PurchaseDate” is a date field.

 

Both methods worked on my tests, Bob....

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...

Important Information

Terms of Use