No don't use the PHP date function, MySQL has an inbuilt function
exactly for this.

See DATE_FORMAT http://www.mysql.com/doc/en/Date_and_time_functions.html

HTH

Adrian
www.phpscriptsearch.com

-----Original Message-----
From: Chris Hayes [mailto:[EMAIL PROTECTED] 
Sent: 25 February 2003 12:32
To: [EMAIL PROTECTED]
Subject: Re: [PHP] FormatDateTime in PHP


At 13:25 25-2-03, you wrote:
>Please,
>
>How do I make to format my date in the my format? For Example:
you forgot to tell how the date in the database is formatted, that is
quite 
important.

did you read the php manual on date() ?
http://www.php.net/manual/en/function.date.php


>## I filter
>$filter = " SELECT DTVECTO FROM CLIENTS";
>$result = mysql_query($filter);
>$rows   = mysql_num_rows($result);
>while($rows = mysql_fetch_array($result)) {
>    ## I get date to the data base
>    $my_date = $rows["DTVECTO"];
>    ## I print
>    print($my_date);
>}
>
>I want to show my date in format: 01/12/2003 (dd/mm/yyyy).
>For Example
>Date                Value
>01/09/2003     $ 50.00
>01/10/2003     $ 60.00
>01/11/2003     $ 70.00
>
>
>
>thanks


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to