"Raymond O'Donnell" <rod@xxxxxx> writes: > to_char(extract (month from d.dates), 'FMmonth') as month_name, > to_char(extract (day from d.dates), 'FMday') as day_name I think you want just to_char(d.dates, 'FMmonth') and so on. What you're invoking above is to_char(numeric) which has entirely different format codes... regards, tom lane