select to_date(:year, 'YYYY')
as archive_date,
to_char(to_date(:year, 'YYYY'), 'YYYY')
as archive_date_pretty
from dual
select to_date(:year || :month, 'YYYYMM')
as archive_date,
to_char(to_date(:year || :month, 'YYYYMM'), 'fmMonthfm YYYY')
as archive_date_pretty
from dual
select to_date(:year || :month || :day, 'YYYYMMDD')
as archive_date,
to_char(to_date(:year || :month || :day, 'YYYYMMDD'), 'fmMonthfm YYYY')
as archive_month_pretty,
to_char(to_date(:year || :month || :day, 'YYYYMMDD'), 'DD')
as archive_date_pretty
from dual
select category_id, name as category_name
from pinds_blog_categories
where short_name = :category_short_name and package_id = :package_id
select short_name as category_short_name, name as category_name
from pinds_blog_categories
where package_id = :package_id