cube-manager/cube-manager-data/src/main/resources/org/gcube/data/analysis/tabulardata/sql/to_iso_decade.sql

3 lines
167 B
PL/PgSQL

CREATE OR REPLACE FUNCTION to_iso_decade(anyelement) RETURNS timestamp with time zone as $$
SELECT ($1::text || '0-01-01')::timestamp with time zone;
$$ LANGUAGE SQL;