Hi,

All you need is to insert the data into the database as

YYYYMMDD

and then pull it out reformatting it with mySQL functions:


        SELECT
                DATE_FORMAT(date, "%W, %e %M %Y") AS date
        FROM
                table
        ;

this will return you the date in "Monday, 20 April 2001" format

Consult with mySQL (or other SQL DB) manuals searching for DATE_FORMAT.





Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com






-----Original Message-----
From: Sandeep Hundal [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 16, 2001 11:33 AM
To: php
Subject: [PHP] a quick date and session id question


Hi all,

I got two small questions. I'm trying to make an events calendar for
my site, in which I want people to input in future dates, and then
have the database display events by date.

NOw they will probably be given a form which allows them to choose,
and then gets inputted into the datase as a number : YYYYMMDD. But I
want to display the data as "Monday, 20 April 2001. How can I do
this? Or should I change the way I input data??

Secondly, Anyone know fof a good tutorial explaining what sessionid's
in php are for and how to use them??

TIA!

/sunny

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

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

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