0

DateDiff documentation says "dy" for days, but Custom Column only accepts "dd"

Hello PA Team,

I found an inconsistency between the PQL documentation and the actual behavior of DateDiff in a Custom Column.

https://help.pyramidanalytics.com/2024/Content/Root/developer/reference/fx/PQL/Common/Date-Time/DateDiff.htm?Highlight=datediff

According to the documentation for DateDiff, the supported flag for days is:
- "dy"
- "dayofyear"

However, when using this in a Custom Column, the following expression fails:

DateDiff(last_login_date, now(), "dy")

Error:
Unsupported date offset type: dy

At the same time, the following expression succeeds:

DateDiff(last_login_date, now(), "dd")

The issue is that "dd" is not mentioned in the documentation, while the documented "dy" does not work in this context.

Expected behavior:
- either "dy" should work as documented,
- or the documentation should be updated to reflect the actually supported flag values for this function in Custom Columns.

This looks like either a documentation issue or an inconsistency in the function implementation for Custom Columns.

Screenshots attached.

 Thanks.

1 reply

null
    • VP Product Management
    • Ian_Macdonald
    • 2 days ago
    • Reported - view

    Thank you  we'll fix it.

Content aside

  • Status Answered
  • 2 days agoLast active
  • 1Replies
  • 13Views
  • 2 Following