<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>data schemas | Woody Hayday | Blog</title>
	<atom:link href="https://blog.woodylabs.com/tag/data-schemas/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.woodylabs.com</link>
	<description>An exploration of life, technology and writing</description>
	<lastBuildDate>Tue, 13 Jan 2015 15:19:03 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://blog.woodylabs.com/wp-content/uploads/2015/01/cropped-woody-hayday-yosemite-glacier-point-32x32.jpg</url>
	<title>data schemas | Woody Hayday | Blog</title>
	<link>https://blog.woodylabs.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>MySQL datetime examples &#8211; first/last day of the year &#8211; dates and unix-times</title>
		<link>https://blog.woodylabs.com/2011/11/mysql-datetime-examples-firstlast-day-of-the-year-dates-and-unix-times/</link>
					<comments>https://blog.woodylabs.com/2011/11/mysql-datetime-examples-firstlast-day-of-the-year-dates-and-unix-times/#comments</comments>
		
		<dc:creator><![CDATA[Woody]]></dc:creator>
		<pubDate>Thu, 10 Nov 2011 09:09:22 +0000</pubDate>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Transactional SQL]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Technology]]></category>
		<category><![CDATA[data schemas]]></category>
		<category><![CDATA[facebook data acquisition]]></category>
		<category><![CDATA[facebook graph api]]></category>
		<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL Workbench]]></category>
		<category><![CDATA[Query]]></category>
		<category><![CDATA[Timestamps]]></category>
		<category><![CDATA[UNIX]]></category>
		<guid isPermaLink="false">http://blog.woodylabs.com/?p=797</guid>

					<description><![CDATA[<p>For some reason I had an abstract memory of SQL SERVER 2000, timestamps and pain. Who knows why. Perhaps its a faulty memory. lol. Anyhow working with timestamps in MySQL/MSSQL these days is nothing short of simple. With MySQL Workbench free its ridiculous how far the barrier of entry for database design has come, its [&#8230;]</p>
<p>The post <a href="https://blog.woodylabs.com/2011/11/mysql-datetime-examples-firstlast-day-of-the-year-dates-and-unix-times/">MySQL datetime examples – first/last day of the year – dates and unix-times</a> first appeared on <a href="https://blog.woodylabs.com">Woody Hayday | Blog</a>.</p><hr /><a href="https://blog.woodylabs.com">Visit Woody Haydays Blog</a><hr />]]></description>
										<content:encoded><![CDATA[<p>For some reason I had an abstract memory of SQL SERVER 2000, timestamps and pain. Who knows why. Perhaps its a faulty memory. lol. Anyhow working with timestamps in MySQL/MSSQL these days is nothing short of simple. With MySQL Workbench free its ridiculous how far the barrier of entry for database design has come, its now all pleasant schema&#8217;s and error messages that make sense, gone are the days of spending half the time fixing/navigating the database system, they just work now (99% of the time) what a lucky generation of programmers! Anyhow here&#8217;s some datetime examples that you might find useful:</p>
<p>Get last day of last year &#8211; obvious, but still (+1 this for first day):</p>
<pre class="brush: sql; title: ; notranslate">SELECT DATE(CURDATE()- INTERVAL DAYOFYEAR(CURDATE()) DAY);</pre>
<p>And how useful&#8230; FROM_UNIXTIME takes a unix timestamp and makes it a friendly datetime, its like they KNOW I am coding for facebook data acquisition&#8230;Anyhow&#8230;</p>
<p>To make a GMT UNIX time-stamp for the first day of this month:</p>
<pre class="brush: sql; title: ; notranslate">SELECT UNIX_TIMESTAMP(CONVERT_TZ(DATE(CURDATE()- INTERVAL DAYOFMONTH(CURDATE()) DAY), '+0:00', 'SYSTEM'));</pre>
<p>You can switch out the dates obviously, and there are probably other ways, still, mostly pain free.  </p><p>The post <a href="https://blog.woodylabs.com/2011/11/mysql-datetime-examples-firstlast-day-of-the-year-dates-and-unix-times/">MySQL datetime examples – first/last day of the year – dates and unix-times</a> first appeared on <a href="https://blog.woodylabs.com">Woody Hayday | Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://blog.woodylabs.com/2011/11/mysql-datetime-examples-firstlast-day-of-the-year-dates-and-unix-times/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
