You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

6 lines
471 B

src: |
SELECT p_indicateurs_cumules.date_reference AS jour_now,
date(date_trunc('month'::text, p_indicateurs_cumules.date_reference::timestamp with time zone) + '1 mon'::interval - '1 day'::interval) AS mois_now,
date(date_trunc('year'::text, p_indicateurs_cumules.date_reference::timestamp with time zone) + '1 year'::interval - '1 day'::interval) AS annee_now
FROM eco.p_indicateurs_cumules
WHERE p_indicateurs_cumules.periode_type = 'NOW'::text;