For AI agents: an index of this documentation is at https://developer.rippling.com/llms.txt. Public pages have a Markdown version at the same URL with .md added.

Skip to main content
index

DATE_TRUNC() Function

Use with AI:Rippling AI ChatGPT Claude Cursor

Description​

Truncates a date or timestamp to the specified precision

Syntax​

DATE_TRUNC(datepart, date)

Parameters​

ParameterDescriptionData TypeRequired
unitDate or time part (for example day, month, year)StringYes
timestampTimestamp valueTimestampYes

Accepted datepart values​

Datepart NameDatepart Abbreviation
yearyy, yyyy
quarterqq, q
monthmm, m
dayofyeardy, y
daydd, d
weekwk, ww
weekdaydw, w
hourhh
minutemi, n
secondss, s
millisecondms
microsecondmcs
nanosecondns

Example​

SELECT
DATE_TRUNC('month', start_date)
FROM
rippling.employee.Employee
LIMIT
5;