<? echo date("m d > 
Y",strtotime(odbc_result($resultado,'fechaasignacion')));?>

date accepts unix timestamps, not strings, so you have to convert that 
string to a unix time with strtotime.

Mike

Jorge Arechiga wrote:
> Hi everybody
>       
> I hope someone can help me in an issue on where i've been stuck for a while.
> I'm trying to show a date from a Table in SQLServer7
> when i use this :
>       <tr><td align="right" width="60%"><? echo
> (odbc_result($resultd1,'date1'));?></td></tr>
> 
> the browser shows me the date correctly and the result is this:  2002-02-01
> 11:31:00
> Obviously i want to format the date so i use the date() function and the
> code is like this:
>       <tr><td align="right" width="60%"><? echo date("m d
> Y",odbc_result($resultado,'fechaasignacion'));?></td></tr>
> 
> But when i want to see the date in the browser the date doesn´t match with
> the real date and the result is this:
> 
>               12 31 1969
> Does anybody knows how coul i fix this, so the displayed date matches with
> the one that is in the database?
> Thank a lot
> George
>               
> 


-- 
We warn the reader in advance that the proof presented here depends on a
clever but highly unmotivated trick.
                -- Howard Anton, "Elementary Linear Algebra"


-- 
PHP General 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