Check out the date functions in php, they're very nice. mktime(), 
date(), strftime(), and setlocale()

-Steve

On Friday, October 26, 2001, at 08:47  AM, Rick Emery wrote:

> Assume the following table:
> create mytable (
>   mydate date );
>
> Assume the following inserts:
> INSERT INTO mytable VALUES( "2003-02-20");
> INSERT INTO mytable VALUES( "2004-12-25");
> INSERT INTO mytable VALUES( "1999-01-01");
>
> The following will order this table, assuming precedence of
> year->month->day, and print in Euro format:
> SELECT DATE_FORMAT(mydate,"%d/%m/%Y") FROM mytable ORDER BY mydate;
>
> The following will order this table, assuming precedence of
> day->month->year, and print in Euro format:
> SELECT DATE_FORMAT(mydate,"%d/%m/%Y") AS edate FROM mytable ORDER BY 
> edate;
>
> With basic PHP, you can format the Euro date input into the script into 
> the
> YYYY-MM-DD requied for insertion into the database.
>
> -----Original Message-----
> From: ax [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 26, 2001 6:11 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] date
>
>
> how would i enter european format date into mysql (dd/mm/yyyy) ... and 
> how
> would i make the query sort by date if i am using this format ??
>
> ax
>
>
>
> --
> 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]
>


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