create or replace function ymd( p_year int, p_month int, p_day int) returns date language plpgsql as $$ declare ret_ymd date; begin SELECT TO_DATE(p_year::varchar||LPAD(p_month::varchar, 2, '0')||p_day::varchar,'YYYYMMDD') into ret_ymd; return ret_ymd; end;$$
Devamını Oku »postresql dmy() function
create or replace function dmy( p_day int, p_month int, p_year int) returns date language plpgsql as $$ declare ret_dmy date; begin SELECT TO_DATE(p_year::varchar||LPAD(p_month::varchar, 2, '0')||p_day::varchar,'YYYYMMDD') into ret_dmy; return ret_dmy; end;$$
Devamını Oku »Postgresql mdy() function
create or replace function mdy(p_month int, p_day int, p_year int) returns date language plpgsql as $$ declare ret_mdy date; begin SELECT TO_DATE(p_year::varchar||LPAD(p_month::varchar, 2, '0')||p_day::varchar,'YYYYMMDD') into ret_mdy; return ret_mdy; end;$$
Devamını Oku »