<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using Query Builder how to change datetime to Date9. format in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-Builder-how-to-change-datetime-to-Date9-format/m-p/663222#M36240</link>
    <description>&lt;P&gt;are there any dates before 01jan1960?&amp;nbsp; Did you format the date?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jun 2020 17:14:44 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2020-06-18T17:14:44Z</dc:date>
    <item>
      <title>Using Query Builder how to change datetime to Date9. format</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-Builder-how-to-change-datetime-to-Date9-format/m-p/663220#M36239</link>
      <description>&lt;P&gt;I am incredibly new to sas or any database programming. I use SAS EG as I find it easier to work with. Question, how can I change my datetime column into a Date9. format so I can match using these dates? I would like to do this using the query builder if possible. When I use the datepart function in the advanced expressions I end up with negative numbers on my new calculated column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 17:05:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-Builder-how-to-change-datetime-to-Date9-format/m-p/663220#M36239</guid>
      <dc:creator>FLCrime</dc:creator>
      <dc:date>2020-06-18T17:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using Query Builder how to change datetime to Date9. format</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-Builder-how-to-change-datetime-to-Date9-format/m-p/663222#M36240</link>
      <description>&lt;P&gt;are there any dates before 01jan1960?&amp;nbsp; Did you format the date?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 17:14:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-Builder-how-to-change-datetime-to-Date9-format/m-p/663222#M36240</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-06-18T17:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using Query Builder how to change datetime to Date9. format</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-Builder-how-to-change-datetime-to-Date9-format/m-p/663227#M36241</link>
      <description>&lt;P&gt;Image below is all I know at this point. This is prior to me attempting the calculated column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 591px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/46360i3FBE78199314BB31/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 17:18:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-Builder-how-to-change-datetime-to-Date9-format/m-p/663227#M36241</guid>
      <dc:creator>FLCrime</dc:creator>
      <dc:date>2020-06-18T17:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using Query Builder how to change datetime to Date9. format</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-Builder-how-to-change-datetime-to-Date9-format/m-p/663229#M36242</link>
      <description>&lt;P&gt;You can have negative dates so SAS is likely correct.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS stores dates/datetimes as a number from a reference date, in this case January 1, 1960. So any dates before Jan 1, 1960 are negative. Apply a date format to the field and SAS will show the data correctly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a great, but longer and in depth, reference for dates and times in SAS. I highly recommend reading this if you're working with dates and datetimes extensively.&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/314636"&gt;@FLCrime&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am incredibly new to sas or any database programming. I use SAS EG as I find it easier to work with. Question, how can I change my datetime column into a Date9. format so I can match using these dates? I would like to do this using the query builder if possible. When I use the datepart function in the advanced expressions I end up with negative numbers on my new calculated column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 17:22:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-Builder-how-to-change-datetime-to-Date9-format/m-p/663229#M36242</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-06-18T17:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using Query Builder how to change datetime to Date9. format</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-Builder-how-to-change-datetime-to-Date9-format/m-p/663230#M36243</link>
      <description>&lt;P&gt;Okay:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Query builder&lt;/P&gt;
&lt;P&gt;2. Add table&lt;/P&gt;
&lt;P&gt;3. Choose columns&lt;/P&gt;
&lt;P&gt;4. Add new computed column&lt;/P&gt;
&lt;P&gt;5. Advanced expression&lt;/P&gt;
&lt;P&gt;6. Enter an expression: datepart(your_datetime)&lt;/P&gt;
&lt;P&gt;7. Modify additional options-- change the format to datew.d and choose 9&lt;/P&gt;
&lt;P&gt;8. Finish&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Now, run&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 17:22:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-Builder-how-to-change-datetime-to-Date9-format/m-p/663230#M36243</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-06-18T17:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: Using Query Builder how to change datetime to Date9. format</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-Builder-how-to-change-datetime-to-Date9-format/m-p/663231#M36244</link>
      <description>&lt;P&gt;Thank you so much. It always turn out to be something super simple that I missed or had no knowledge of.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 17:26:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-Builder-how-to-change-datetime-to-Date9-format/m-p/663231#M36244</guid>
      <dc:creator>FLCrime</dc:creator>
      <dc:date>2020-06-18T17:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using Query Builder how to change datetime to Date9. format</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-Builder-how-to-change-datetime-to-Date9-format/m-p/663233#M36245</link>
      <description>&lt;P&gt;No worries. It's one of those days. I must confess I still do not know what a computer,an operating system is. lol&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 17:28:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-Query-Builder-how-to-change-datetime-to-Date9-format/m-p/663233#M36245</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-06-18T17:28:13Z</dc:date>
    </item>
  </channel>
</rss>

