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

2
  • 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
    Commented Mar 6, 2018 at 6:54
  • This formula LastModifiedDate >= now() + (-1.8) returns true if LastModifiedDate ranges from last 24 hours
    – CloudDot
    Commented Mar 6, 2018 at 7:01

1 Answer 1

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.

3
  • 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
    – CloudDot
    Commented Mar 6, 2018 at 7:05
  • What if LastModifiedDate is in the last 36 hrs, does the formula return true? Commented Mar 6, 2018 at 20:30
  • I pulled up a report and checked, it was only for 24 hours
    – CloudDot
    Commented Mar 7, 2018 at 5:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .