You need to sign in to do that
Don't have an account?
Monishan M
Hi, Can you please let me know how to find if the date diff between two dates is exact 60 days
Hi,
I need to find difference between a date field and todays date and check if its equal to exact 60 days.
I used the below statement in code bt its throwing error as
"Invalid field 60 for object "
Statement:
if(60==Integer.ValueOf(Date.valueof(startdate).daysBetween(System.today())))
Could you please let me know how to achieve this?
Thanks
I need to find difference between a date field and todays date and check if its equal to exact 60 days.
I used the below statement in code bt its throwing error as
"Invalid field 60 for object "
Statement:
if(60==Integer.ValueOf(Date.valueof(startdate).daysBetween(System.today())))
Could you please let me know how to achieve this?
Thanks
Per this documentation, If you want to find how many days there are between two dates, you should use something like this
Can you try doing If(60==TODAY() - DATEVALUE (startdate))?
To find the number of days between two dates, date_1 and date_2, just subtract the earlier date from the later date: date_1 — date_2
Also, see this help article
If you find this information helpful, please mark this answer as Best. It may help others in the community. Thank You!
Anudeep
Please have a look:
1) You can create a formula field to check :
2) Using Apex Code:
Let me know if it works!