Month(2) looks to work great ! Thanks !
Last two question:
1. Is there a more performance efficient way to convert a date (YYYY-MM-DD) to the first day of the month (YYYY-MM-01) than expression for date1 in the SQL statement below ?
Example: Convert(2003-01-20) = 2003-01-01
2. Is there a more performance efficient way to convert a date in integer type (YYYYMM) to the same result date format (YYYY-MM-01) than expression for date2 in the SQL statement below ?
Example: Convert(200301) = 2003-01-01
select distinct (date1/100 || '01') (char(15)) (integer) (date) date1
,((date2_yyyymm -190000) || '01') (char(15)) (integer) (date) date2
,(date1 - date2 ) month(2) as "difference"
from table_name