<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1037478" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1037478</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/todays-date-php#comment-1218428</link>
    <description> &lt;p&gt;You can do things like&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;SELECT things FROM wherever ORDER BY date_stamp DESC&lt;/code&gt;&lt;/div&gt;&#039;&lt;br /&gt;
and it just &#039;magically&#039; works.&lt;/p&gt;
&lt;p&gt;As for outputting, you can just pull the data out of the database, and format it.  For example (in PHP):&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;$sql = mysql_query(&amp;quot;SELECT date_stamp FROM whatever WHERE id = &amp;#039;$id&amp;#039;&amp;quot;);&lt;br /&gt;$qry = mysql_fetch_array($sql);&lt;br /&gt;&lt;br /&gt;$pre_date = $qry[&amp;#039;date_stamp&amp;#039;];&lt;br /&gt;$format = &amp;#039;D of F&amp;#039;;&lt;br /&gt;&lt;br /&gt;$form_date = date($format, strtotime($pre_date));&lt;br /&gt;&lt;br /&gt;echo $form_date;&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;Presto.&lt;/p&gt;
 </description>
     <pubDate>Fri, 27 Apr 2007 01:40:45 +0000</pubDate>
 <dc:creator>brady.k</dc:creator>
 <guid isPermaLink="false">comment 1218428 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/todays-date-php#comment-1218426</link>
    <description> &lt;p&gt;thanks, i deleted my inserts in the script becuase i gave up and now just checked and there all there!!&lt;br /&gt;
So i can still order by date even though they are actually in a date format? Mysql and php will know will they?&lt;/p&gt;
&lt;p&gt;i can use the date() function to out put them?&lt;/p&gt;
 </description>
     <pubDate>Fri, 27 Apr 2007 01:30:49 +0000</pubDate>
 <dc:creator>benf</dc:creator>
 <guid isPermaLink="false">comment 1218426 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/todays-date-php#comment-1218423</link>
    <description> &lt;p&gt;The database will create the timestamp for you.  You don&#039;t have to supply a value using PHP&#039;s time().  &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Thu, 26 Apr 2007 22:27:07 +0000</pubDate>
 <dc:creator>Abhishek Reddy</dc:creator>
 <guid isPermaLink="false">comment 1218423 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/todays-date-php#comment-1218417</link>
    <description> &lt;p&gt;I cant seem to insert a timestamp in to mysql? I have used this in my query to insert the timestamp:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;Date_created=&amp;#039;time()&amp;#039;,&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;My database field is set to &quot;timestamp&quot;, and default &quot;CURRENT_TIMESTAMP&quot; attributes &quot; 	ON UPDATE CURRENT_TIMESTAMP&quot; but when i insert into the database it stays at this:&lt;/p&gt;
&lt;p&gt;0000-00-00 00:00:00&lt;/p&gt;
 </description>
     <pubDate>Thu, 26 Apr 2007 18:21:23 +0000</pubDate>
 <dc:creator>benf</dc:creator>
 <guid isPermaLink="false">comment 1218417 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/todays-date-php#comment-1214880</link>
    <description> &lt;p&gt;Post the code you ran to get correct and incorrect dates.  The only ways I can think of to get an incorrect date in 1969 is if you supplied an improper timestamp, or if the system&#039;s time is itself wrong.&lt;/p&gt;
&lt;p&gt;The timestamp doesn&#039;t need to be in [].  The square bracket notation just means the parameter is optional.  In this case, missing the timestamp argument will cause it to default to the value of time().&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Sun, 11 Feb 2007 12:41:18 +0000</pubDate>
 <dc:creator>Abhishek Reddy</dc:creator>
 <guid isPermaLink="false">comment 1214880 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/todays-date-php#comment-1214841</link>
    <description> &lt;p&gt;mmmm yes this has been done only a few of the dates are ok but some are coming out saying 1969?  Does the time stamp have to be in []?&lt;/p&gt;
 </description>
     <pubDate>Sat, 10 Feb 2007 03:00:54 +0000</pubDate>
 <dc:creator>benf</dc:creator>
 <guid isPermaLink="false">comment 1214841 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/todays-date-php#comment-1214839</link>
    <description> &lt;p&gt;See &lt;a href=&quot;http://www.php.net/date&quot; class=&quot;bb-url&quot;&gt;http://www.php.net/date&lt;/a&gt; for more info.&lt;/p&gt;
&lt;p&gt;-Greg&lt;/p&gt;
 </description>
     <pubDate>Sat, 10 Feb 2007 02:47:34 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1214839 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/todays-date-php#comment-1214832</link>
    <description> &lt;p&gt;This&lt;/p&gt;
&lt;p&gt;date(&quot;date format&quot;,[timestamp])&lt;/p&gt;
&lt;p&gt;or this&lt;/p&gt;
&lt;p&gt;date(&quot;F j, Y, g:i a&quot;)&lt;/p&gt;
 </description>
     <pubDate>Sat, 10 Feb 2007 02:36:16 +0000</pubDate>
 <dc:creator>demonhale</dc:creator>
 <guid isPermaLink="false">comment 1214832 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
