0

what is 1.8 in this expression.

I have seen people using now() + (-1.8) or now() + (1.8) for making 24 hours difference.

What exactly is 1.8

  • 1
    Can you provide a specific reference to a link or document that demonstrates this? I can't say I've ever seen this specifically. – sfdcfox Mar 6 '18 at 6:54
  • This formula LastModifiedDate >= now() + (-1.8) returns true if LastModifiedDate ranges from last 24 hours – PrajForce Mar 6 '18 at 7:01
0

Date and time arithmetic is explained in this help article: https://help.salesforce.com/articleView?id=formula_using_date_datetime.htm&type=5

The value indicates the difference in number of days, hours, and minutes. The quantity to the left of the decimal is the number of days, and the quantity to the right is the fraction of a day.

The value of 1.8 doesn't make any sense for a 24-hour difference, so you need to post more details about your formula and if it actually works.

  • Exactly am not understanding the origin of 1.8 here, but it happens to be working when i checked. For ex :LastModifiedDate >= now() + (-1.8) returns true if LastModifiedDate ranges from last 24 hours – PrajForce Mar 6 '18 at 7:05
  • What if LastModifiedDate is in the last 36 hrs, does the formula return true? – David Cheng Mar 6 '18 at 20:30
  • I pulled up a report and checked, it was only for 24 hours – PrajForce Mar 7 '18 at 5:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.