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

3 lines
166 B
PL/PgSQL

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