<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Comments on snippet: 'Date format for mysql input'</title>
    <description>Snipplr comments feed</description>
    <link>https://ipv6.snipplr.com/</link>
    <lastBuildDate>Wed, 22 Apr 2026 06:57:38 +0000</lastBuildDate>
    <item>
      <title>daveismyname said on 28/Sep/2009</title>
      <link>https://ipv6.snipplr.com/view/20333/date-format-for-mysql-input</link>
      <description>&lt;p&gt;Spotted a mistake the last line should be:&#13;
$date= "$var_year-$var_day-$var_month";//join them all together to input into a mysql table&lt;/p&gt;</description>
      <pubDate>Mon, 28 Sep 2009 04:20:27 UTC</pubDate>
      <guid>https://ipv6.snipplr.com/view/20333/date-format-for-mysql-input</guid>
    </item>
    <item>
      <title>nkm said on 28/Sep/2009</title>
      <link>https://ipv6.snipplr.com/view/20333/date-format-for-mysql-input</link>
      <description>&lt;p&gt;MySQL date format is yyyy-mm-dd. Also, you should check if the date is correct.&#13;
&lt;pre&gt;&#13;
	&lt;code&gt;&#13;
function date_mysql($str)&#13;
{&#13;
	list($day, $month, $year) = explode('/', $str);&#13;
&#13;
	if (checkdate((int) $month, (int) $day, (int) $year))&#13;
	{&#13;
		return $year.'-'.$month.'-'.$day;&#13;
	}&#13;
&#13;
	return FALSE;&#13;
}&#13;
	&lt;/code&gt;&#13;
&lt;/pre&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 28 Sep 2009 05:59:35 UTC</pubDate>
      <guid>https://ipv6.snipplr.com/view/20333/date-format-for-mysql-input</guid>
    </item>
  </channel>
</rss>
