it is right but I want to select all data from a mdbdatabase table and I
receive in 'yyyy/mm/dd hh:mm:ss' format.
I told you I resolve this problem with date("F j,
Y",strtotime(odbc_result($cur,"date"))).
I what to know if I can receive a specific format from query "select date
from my_table"

--


Best regards,
George Nicolae
IT Manager
___________________
X-Playin - Professional Web Design
www.x-playin.f2s.com



"Andrew Hill" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> George,
>
> The ODBC date syntax is best used for to make input format unambiguous,
> e.g.:
>
> select * from orders where order_date = { d '2002-01-01'}
> This will allow you to select from a table regardless of the date format.
>
> For converting a date from one format to another, select it from a table
and
> then use the PHP date() function to convert, e.g.:
>
> while (list ($timestamp) = each ($result_array))
> {
>     $new_format = date(Y-m-d, $timestamp);
> echo "$new_format<br>";
> }
>
> Best regards,
> Andrew Hill
> Director of Technology Evangelism
> OpenLink Software  http://www.openlinksw.com
> Universal Data Access & Data Integration Technology Providers
>
> > -----Original Message-----
> > From: George Nicolae [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, December 31, 2001 12:51 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP-DB] odbc date
> >
> >
> > i did it with date("F j, Y",strtotime(odbc_result($cur,"date"))).
> > but i very curios about the query. it must looke like..?
> > select date from my_table?????
> >
> > --
> >
> >
> > Best regards,
> > George Nicolae
> > IT Manager
> > ___________________
> > X-Playin - Professional Web Design
> > www.x-playin.f2s.com
> >
> >
> >
> >
> > > Or you can format it with odbc date syntax in your query { d
> > 'YYYY-MM-DD' }
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to