----- Original Message ----
From: John Black <[EMAIL PROTECTED]>
To: php-list@yahoogroups.com
Sent: Monday, June 23, 2008 2:44:28 PM
Subject: Re: [php-list] date and mysql


Jennifer Gardner wrote:
> Hello,
> I am looking for a good tutorial for having the date submitted when a form
> is submitted and then being able to display the date in a results
> table/page. Basically, when the form is submitted I want the date submitted
> into the mysql table and then I want to display that on a results page.
> Thank you in advance for your help.
> Jennifer

That should be pretty simple, when you INSERT your data into mysql, add 
NOW() to insert the current time stamp.
http://dev.mysql. com/doc/refman/ 5.0/en/date- and-time- functions. 
html#function_ now

Retrieving is just as easy with dateformat
http://dev.mysql. com/doc/refman/ 5.0/en/date- and-time- functions. 
html#function_ date-format

Let me know if you need help and I will post example MySQL queries.

John
__._,_.
One more question related to this topic:
To my table, I enter the dates through a webform I did, and the format I 
enter is as 2008-06-23.
When displaying it, right now I am displaying the dates in the same format...
How can I display the dates in a different format, such as: June 23, or June 
23rd 2008?
Thanks 
___ 
Messages in this topic (12) Reply (via web post) | Start a new topic 
Messages | Polls 
Please remember to write your response BELOW the previous text. 

Community email addresses:
  Post message: php-list@yahoogroups.com
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
MARKETPLACE



      

Reply via email to