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.
 
 
 

23 lines
410 B

return: date
lang: plpgsql
parameters:
p0:
type: anyelement
p1:
type: anyelement
p2:
type: anyelement
strict: STRICT
src: |
DECLARE
i_year text;
i_month text;
i_day text;
return_date date;
BEGIN
i_year = $1;
i_month = $2;
i_day = $3;
return_date = to_date(lpad(i_year, 4, '0') || lpad(i_month, 2, '0') || lpad(i_day, 2, '0'), 'YYYYMMDD');
return return_date;
END;