FROM_ACTIVITY_BITS

All functions > BUSINESS > FROM_ACTIVITY_BITS

Returns the activity dates for the given activity bits and date reference.

Signatures

Returns: Array of dates when user was active

FROM_ACTIVITY_BITS(activity_bits: BIGINT, date_ref: DATE) → ARRAY<DATE>
sql
ParameterTypeRequiredDescription
activity_bitsBIGINTYesBit-packed activity representation
date_refDATEYesReference date to decode activity relative to

Notes

  • Decodes bit-packed activity back to array of dates
  • Inverse of TO_ACTIVITY_BITS
  • Each set bit becomes a date in the result array
  • Bit 0 (LSB) maps to reference date
  • Bit 1 maps to day before reference date, etc.
  • Up to 56 days of history
  • Useful for debugging or exporting activity data
Last update at: 2026/03/03 16:47:38
Last updated: 2026-03-03 16:48:19