The DATE_TRUNC function is used to truncate date/datetimes to specified precision. https://www.w3resource.com/PostgreSQL/date_trunc-function.php