Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Oracle ODBC driver: How to get ISO week number from a date

Oracle ODBC driver: How to get ISO week number from a date

From: Wolfram Roesler <wr_at_spam.la>
Date: Wed, 4 Oct 2006 11:09:36 +0200
Message-ID: <Xns98527186273BFwrgrpde@62.153.159.134>


Hello,

I'm using the Oracle ODBC driver to get the week number from a DATE column:

        SELECT {fn week(ColumnName)} from TableName;

Unfortunately, the ODBC driver translates this into:

        SELECT to_char(ColumnName,'WW') from TableName;

which returns the week number relative to the first day of the year, I need the ISO week number instead however. In Oracle, I can get this with

        SELECT to_char(ColumnName,'IW') from TableName;

but is it possible to get the ISO week number (and corresponding year, i. e. what Oracle returns with 'IYYY') via an ODBC function?

Thanks for any help
W. Roesler Received on Wed Oct 04 2006 - 04:09:36 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US