<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1017929" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1017929</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/difference-between-time-datetime-and-timestamp#comment-1104890</link>
    <description> &lt;p&gt;&lt;strong&gt;Timestamp&lt;/strong&gt; is a SQL field that basically is used to record when an object is changed. If you have a Timestamp field in MySQL and you have an insert or update script with a NULL value in this column, then it will use the current time. Depending upon the length of the field, will determine the format. A timestamp(14) produces a value like so: &lt;strong&gt;YYYYMMDDHHMMSS&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;Datetime&lt;/strong&gt; is quite similar to Timestamp, it just stores the data as &lt;strong&gt;YYYY-MM-DD- HH:MM:SS&lt;/strong&gt; as a more formated string. I don&#039;t think that the NULL value will give anything but NULL.&lt;br /&gt;
&lt;strong&gt;Time&lt;/strong&gt; is also quite similar to the above except that it only records the time as &lt;strong&gt;HH:MM:SS&lt;/strong&gt;, no dates at all. &lt;/p&gt;
&lt;p&gt;Of course, in MySQL, there is also the DATE field which can also be made to default to the current date time. It is a little tricky to use sometimes since MySQL stores the date in the following format: &lt;strong&gt;YY-MM-DD&lt;/strong&gt;. Which looks a little weird when used as a date. Using PHP, you can get MySQL to format the date properly by using a query string like so:&lt;br /&gt;
&quot;SELECT *, DATE_FORMAT(datefield, &#039;%W, %M %D&#039;) as datefield . In MySQL, todays date would be output as 20010317. Using the above select statement, the date would be output as Sunday, March 17. I left the year off but could quite easily put that on as well.&lt;/p&gt;
&lt;p&gt;Timestamp is often used as kind of an audit trail to see when a database record was last updated. It would also be used to generate a customer order date from an order placed. Anything like that.&lt;/p&gt;
 </description>
     <pubDate>Sun, 17 Mar 2002 02:29:55 +0000</pubDate>
 <dc:creator>mairving</dc:creator>
 <guid isPermaLink="false">comment 1104890 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
