Thread: Year and month comparison

Year and month comparison

From
"Del Mistro, Enzo"
Date:
Hi all,

I am trying to perform a Year and Month comparison from a date field.
Within oracle this is working, however within the Postgresql environment I
am getting an error.

I currently have a call as follows:

select descr
and (to_char(subsc_paid_to_dt,'YYYYMM') < to_char(current_date,'YYYYMM') 
(so this is performing a comparison by year and month, not by actual day of
the month)

Any suggestions?

Thanks & regards,    Enzo
Enzo  Del Mistro   * 
33 Yonge St, Suite 500,  *  Toronto,  ON
Phone: 001 416 814 1741
E-Mail: enzo.delmistro@eds.com
> Business Acceleration Services TOR, 
> Solutions Consulting
> 
>