Oracle has a TOCHAR and TODATE function, which my help in what you are trying to do. Simply "force" the date in your query to the format you want it in. You can find out more with a simple google search on these terms.
TO_DATE('01-FEB-2002' ,'dd-mon-yyyy')
- Paul
-----Original Message-----
From: j0rd1 Adame [mailto:jordi@jordi.net]
Sent: Friday, May 16, 2003 4:31 PM
To: php-db@lists.php.net
Subject: Oracle + NLS_DATE_FORMAT
Hello
I have put NLS_DATE_FORMAT in my client machine (Linux) to be YY-MM-DD, but
when I use PHP, i get dates in the YY-mon-DD format
I tried using putenv('NLS_DATE_FORMAT="DD-MM-YYYY HH24:MI:SS"');
I added export NLS_DATE_FORMAT="DD-MM-YYYY HH24:MI:SS" to /usr/sbin/apatchectl
and restarted Apache
I tried using NLS_DATE_FORMAT as a global variable for my whole system and
still nothing
I tried using
$stmt = OCIParse($conn,
"ALTER SESSION SET NLS_DATE_FORMAT='DD-MM-YYYY HH24:MI:SS'");
OCIExecute($stmt);
and yet... nothing
any ideas?
j0rd1
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php