<?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>Aptech &#187; Answers for "Quarterly data"</title>
	<atom:link href="http://www.aptech.com/questions/quarterly-data/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aptech.com</link>
	<description></description>
	<lastBuildDate>Fri, 08 Feb 2013 19:12:28 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
		<item>
		<title>By: Aptech</title>
		<link>http://www.aptech.com/questions/quarterly-data/#answer-2734</link>
		<comments>http://www.aptech.com/questions/quarterly-data/#answer-2734#comments</comments>
		<pubDate>Fri, 07 Dec 2012 14:39:29 +0000</pubDate>
		<dc:creator>Aptech</dc:creator>
		
		<guid isPermaLink="false">http://www.aptech.com/questions/quarterly-data/#answer-2734</guid>
		<description><![CDATA[For dates in GAUSS you want to use what is called &#8220;Date Time&#8221; or DT format. A DT format number is simply a number in which the first 4 digits represent the year, the next 2 represent the month, the &#8230; <a href="http://www.aptech.com/questions/quarterly-data/#answer-2734">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For dates in GAUSS you want to use what is called &#8220;Date Time&#8221; or DT format. A DT format number is simply a number in which the first 4 digits represent the year, the next 2 represent the month, the 2 after that represent the day. So 19701003 would represent January 3, 1970.</p>
<p>GAUSS has a function that will translate a DT number like the one above into a formatted string. It is called <tt>dttostr</tt> and can be used like this:</p>
<pre>
dt = { 19700103, 19700401 };
fmt = <span style="color:#330033">"YYYY-QQ"</span>;
<span style="color:#000099">print</span> dttostr(dt, fmt);
</pre>
<p>This code above will output:</p>
<pre>
1970-Q1
1970-Q2
</pre>
<p>The format input (<tt>fmt</tt> in the example above) to <tt>dttostr</tt> is quite flexible and will allow you to put the different parts of the date such as year, quarter, month day in any order. You can also add any characters you would like to your output string. Here is another example:</p>
<pre>
dt = { 19700103, 19700401 };
fmt = <span style="color:#330033">"QQ/YYYY"</span>;
<span style="color:#000099">print</span> dttostr(dt, fmt);
</pre>
<p>This code above will output:</p>
<pre>
Q1/1970
Q2/1970
</pre>
<p>If you have a string of dates similar to the output above you can convert it back to DT format with the GAUSS function <tt>strtodt</tt>. Note that support for the QQ format element is new to <tt>dttostr</tt> and <tt>strtodt</tt> in GAUSS version 13.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aptech.com/questions/quarterly-data/#answer-2734/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: www.aptech.com @ 2013-02-09 01:43:16 --