Enhance Your SAQL Queries With Open-Ended Dates Support (Pilot)

SAQL now supports open-ended ranges for absolute and relative dates filters.

With open-ended date ranges, Salesforce Analytics Query Language (SAQL) now enables you to build queries like “List all opportunities closed after 12/23/2014” and “Get a list of marketing campaigns from before 04/2/2015.”

Open-ended relative date filters look like this:
a = filter a by date('year','month','day')in[.."current month"]
New SAQL date functions in this release are the following:
  • now(): Returns current date time in UTC (GMT calendar).
  • toDate (dateStr, [formatStr]): Converts a string to a date. If no format string is specified, uses default format yyyy-MM-dd HH:mm:ss .
  • toDate (epoch_sec):: Converts Unix epoch seconds to a date. Note: If epoch seconds is 0, toDate(epoch_sec) returns '1970-01-01 00:00:00'.
  • daysBetween(date1, date2b): Returns the number of days between two dates as an integer.
  • toString (date, formatStr): Converts a date to a string.