Re: Simple Pro/C Question

From: Kim Limbrick <kim_at_kiml.demon.co.uk>
Date: Sun, 06 Sep 1998 08:24:21 GMT
Message-ID: <35f2451c.599242185_at_news.demon.co.uk>


[Quoted] On Fri, 04 Sep 1998 13:15:40 GMT, tkyte_at_us.oracle.com (Thomas Kyte) wrote:
>
>use TO_CHAR() on the date field with the format mask you want, for example
>
>
>void process( int rows )
>{
>EXEC SQL BEGIN DECLARE SECTION;
>VARCHAR str[512];
>EXEC SQL END DECLARE SECTION;
>
> EXEC SQL
> SELECT TO_CHAR( SYSDATE, 'DD-MON-YYYY' ) INTO :str
> FROM DUAL;
>
> printf( "%.*s\n", str.len, str.arr );
>}
>
>
>$ ./test
>04-SEP-1998
>.............
>

Thomas,

Thanks for your help the SQL above works really well. I was wondering if there are any functions I could call to do a simialr job. In some situations I want to do the date formatting after the data has been retrieved.

Regards Received on Sun Sep 06 1998 - 10:24:21 CEST

Original text of this message