<?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: Converting UTC date/time observations to usable format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Converting-UTC-date-time-observations-to-usable-format/m-p/326099#M271513</link>
    <description>&lt;P&gt;My misunderstanding of your data. Use the informat I originally suggested, but then subtract the number of secons&amp;nbsp;from the value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS datetimes represent the number of seconds since January 1, 1960.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Take a look at:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/Is-there-a-way-to-convert-time-from-EST-to-GMT/td-p/128851" target="_blank"&gt;https://communities.sas.com/t5/Base-SAS-Programming/Is-there-a-way-to-convert-time-from-EST-to-GMT/td-p/128851&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jan 2017 19:54:35 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2017-01-19T19:54:35Z</dc:date>
    <item>
      <title>Converting UTC date/time observations to usable format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-UTC-date-time-observations-to-usable-format/m-p/326056#M271503</link>
      <description>&lt;DIV class="lia-message-heading lia-component-message-header"&gt;&lt;DIV class="lia-quilt-row lia-quilt-row-standard"&gt;&lt;DIV class="lia-quilt-column lia-quilt-column-20 lia-quilt-column-left"&gt;&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-left"&gt;&lt;DIV class="lia-message-subject"&gt;&lt;SPAN class="solved"&gt;&lt;IMG src="https://communities.sas.com/skins/images/49BF6C19F215F8ACB98312666774E02A/sas_skin-e5d3bd17/images/message_type_solved.svg" border="0" alt="Accepted Solution" title="Solved!" /&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-body"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;I have a file that is in CSV format. The time stamps are in the format which I have now successfully imported into sas (thanks to a member named Art).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once in SAS the formatting looks like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;08APR11:04:00:00&lt;/P&gt;&lt;P&gt;16APR11:04:00:00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These corresond to April 8, 2011&amp;nbsp;@ 4:00 UTC and April 16, 2011&amp;nbsp;@ 4:00 UTC.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I am hoping to do is to separate each portion of the date out into its own variable such as Year, Month, Day, Hour, Minute.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have typically done this in the past when my data is formatted as YYMMDDN8. by simply using newvar = year(date_var) or newvar = month(date_var), etc...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This method does not seem to work with my dates formatted as DATETIME16. and informat E8601DZ16. However, This formatting is required to import the original CSV file where the date are formatted&amp;nbsp;&lt;/P&gt;&lt;DIV class="lia-message-heading lia-component-message-header"&gt;&lt;DIV class="lia-quilt-row lia-quilt-row-standard"&gt;&lt;DIV class="lia-quilt-column lia-quilt-column-20 lia-quilt-column-left"&gt;&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-left"&gt;&lt;DIV class="lia-message-subject"&gt;&lt;SPAN class="solved"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-body"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;2011-12-30T05:00:00Z&lt;/P&gt;&lt;P&gt;2012-04-09T04:00:00Z&lt;/P&gt;&lt;P&gt;2014-03-10T04:00:00Z&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The import code I use (which was provided by Art) is below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data WORK.ABC ;
  infile 'E:\Research\Data\filename.csv' delimiter = ',' MISSOVER DSD lrecl=32767 firstobs=2 ;
  informat SOURCE $10. ;
  informat SYMBOL $4. ;
  informat TIMESTAMP_UTC e8601dz. ;
  informat BULLISH_INTENSITY best32. ;
  informat BEARISH_INTENSITY best32. ;
  informat BULL_MINUS_BEAR best32. ;
  informat BULL_SCORED_MESSAGES best32. ;
  informat BEAR_SCORED_MESSAGES best32. ;
  informat BULL_BEAR_MSG_RATIO best32. ;
  informat TOTAL_SCANNED_MESSAGES best32. ;
  format SOURCE $10. ;
  format SYMBOL $4. ;
  format TIMESTAMP_UTC datetime. ;
  format BULLISH_INTENSITY best12. ;
  format BEARISH_INTENSITY best12. ;
  format BULL_MINUS_BEAR best12. ;
  format BULL_SCORED_MESSAGES best12. ;
  format BEAR_SCORED_MESSAGES best12. ;
  format BULL_BEAR_MSG_RATIO best12. ;
  format TOTAL_SCANNED_MESSAGES best12. ;
  input
   SOURCE $
   SYMBOL $
   TIMESTAMP_UTC
   BULLISH_INTENSITY
   BEARISH_INTENSITY
   BULL_MINUS_BEAR
   BULL_SCORED_MESSAGES
   BEAR_SCORED_MESSAGES
   BULL_BEAR_MSG_RATIO
   TOTAL_SCANNED_MESSAGES
  ;
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am at a loss here so anyhelp would be greatly appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 19 Jan 2017 17:37:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-UTC-date-time-observations-to-usable-format/m-p/326056#M271503</guid>
      <dc:creator>starky987</dc:creator>
      <dc:date>2017-01-19T17:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Converting UTC date/time observations to usable format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-UTC-date-time-observations-to-usable-format/m-p/326065#M271504</link>
      <description>&lt;P&gt;I think you only have to embed the month, day, year, or hour, minute, second functions with either the DATEPART() or TIMEPART functions. e.g.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;newvar = datepart(year(date_var));&lt;/PRE&gt;
&lt;P&gt;HTH,&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2017 18:05:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-UTC-date-time-observations-to-usable-format/m-p/326065#M271504</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-01-19T18:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: Converting UTC date/time observations to usable format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-UTC-date-time-observations-to-usable-format/m-p/326066#M271505</link>
      <description>&lt;P&gt;Art,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the following error when doing this...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: Invalid argument to function YEAR(1617854400) at line 321 column 21.&lt;BR /&gt;SOURCE=twitter_enha SYMBOL=10GEN TIMESTAMP_UTC=08APR11:04:00:00 BULLISH_INTENSITY=0&lt;BR /&gt;BEARISH_INTENSITY=0 BULL_MINUS_BEAR=0 BULL_SCORED_MESSAGES=0 BEAR_SCORED_MESSAGES=0&lt;BR /&gt;BULL_BEAR_MSG_RATIO=0 TOTAL_SCANNED_MESSAGES=2 year=. _ERROR_=1 _N_=1&lt;BR /&gt;NOTE: Invalid argument to function YEAR(1618545600) at line 321 column 21.&lt;BR /&gt;SOURCE=twitter_enha SYMBOL=10GEN TIMESTAMP_UTC=16APR11:04:00:00 BULLISH_INTENSITY=0&lt;BR /&gt;BEARISH_INTENSITY=0 BULL_MINUS_BEAR=0 BULL_SCORED_MESSAGES=0 BEAR_SCORED_MESSAGES=0&lt;BR /&gt;BULL_BEAR_MSG_RATIO=0 TOTAL_SCANNED_MESSAGES=3 year=. _ERROR_=1 _N_=2&lt;BR /&gt;NOTE: Invalid argument to function YEAR(1618632000) at line 321 column 21.&lt;BR /&gt;SOURCE=twitter_enha SYMBOL=10GEN TIMESTAMP_UTC=17APR11:04:00:00 BULLISH_INTENSITY=0&lt;BR /&gt;BEARISH_INTENSITY=0 BULL_MINUS_BEAR=0 BULL_SCORED_MESSAGES=0 BEAR_SCORED_MESSAGES=0&lt;BR /&gt;BULL_BEAR_MSG_RATIO=0 TOTAL_SCANNED_MESSAGES=2 year=. _ERROR_=1 _N_=3&lt;BR /&gt;NOTE: Invalid argument to function YEAR(1618891200) at line 321 column 21.&lt;BR /&gt;SOURCE=twitter_enha SYMBOL=10GEN TIMESTAMP_UTC=20APR11:04:00:00 BULLISH_INTENSITY=0&lt;BR /&gt;BEARISH_INTENSITY=0 BULL_MINUS_BEAR=0 BULL_SCORED_MESSAGES=0 BEAR_SCORED_MESSAGES=0&lt;BR /&gt;BULL_BEAR_MSG_RATIO=0 TOTAL_SCANNED_MESSAGES=1 year=. _ERROR_=1 _N_=4&lt;BR /&gt;NOTE: Invalid argument to function YEAR(1626667200) at line 321 column 21.&lt;BR /&gt;SOURCE=twitter_enha SYMBOL=10GEN TIMESTAMP_UTC=19JUL11:04:00:00 BULLISH_INTENSITY=0&lt;BR /&gt;BEARISH_INTENSITY=0 BULL_MINUS_BEAR=0 BULL_SCORED_MESSAGES=0 BEAR_SCORED_MESSAGES=0&lt;BR /&gt;BULL_BEAR_MSG_RATIO=0 TOTAL_SCANNED_MESSAGES=3 year=. _ERROR_=1 _N_=5&lt;BR /&gt;NOTE: Invalid argument to function YEAR(1626753600) at line 321 column 21.&lt;BR /&gt;SOURCE=twitter_enha SYMBOL=10GEN TIMESTAMP_UTC=20JUL11:04:00:00 BULLISH_INTENSITY=0&lt;BR /&gt;BEARISH_INTENSITY=0 BULL_MINUS_BEAR=0 BULL_SCORED_MESSAGES=0 BEAR_SCORED_MESSAGES=0&lt;BR /&gt;BULL_BEAR_MSG_RATIO=0 TOTAL_SCANNED_MESSAGES=4 year=. _ERROR_=1 _N_=6&lt;BR /&gt;NOTE: Invalid argument to function YEAR(1626840000) at line 321 column 21.&lt;BR /&gt;SOURCE=twitter_enha SYMBOL=10GEN TIMESTAMP_UTC=21JUL11:04:00:00 BULLISH_INTENSITY=0&lt;BR /&gt;BEARISH_INTENSITY=0 BULL_MINUS_BEAR=0 BULL_SCORED_MESSAGES=0 BEAR_SCORED_MESSAGES=0&lt;BR /&gt;BULL_BEAR_MSG_RATIO=0 TOTAL_SCANNED_MESSAGES=1 year=. _ERROR_=1 _N_=7&lt;BR /&gt;NOTE: Invalid argument to function YEAR(1627012800) at line 321 column 21.&lt;BR /&gt;SOURCE=twitter_enha SYMBOL=10GEN TIMESTAMP_UTC=23JUL11:04:00:00 BULLISH_INTENSITY=2&lt;BR /&gt;BEARISH_INTENSITY=2.83 BULL_MINUS_BEAR=-0.83 BULL_SCORED_MESSAGES=1 BEAR_SCORED_MESSAGES=1&lt;BR /&gt;BULL_BEAR_MSG_RATIO=1 TOTAL_SCANNED_MESSAGES=2 year=. _ERROR_=1 _N_=8&lt;BR /&gt;NOTE: Invalid argument to function YEAR(1627099200) at line 321 column 21.&lt;BR /&gt;SOURCE=twitter_enha SYMBOL=10GEN TIMESTAMP_UTC=24JUL11:04:00:00 BULLISH_INTENSITY=0&lt;BR /&gt;BEARISH_INTENSITY=0 BULL_MINUS_BEAR=0 BULL_SCORED_MESSAGES=0 BEAR_SCORED_MESSAGES=0&lt;BR /&gt;BULL_BEAR_MSG_RATIO=0 TOTAL_SCANNED_MESSAGES=4 year=. _ERROR_=1 _N_=9&lt;BR /&gt;NOTE: Invalid argument to function YEAR(1627185600) at line 321 column 21.&lt;BR /&gt;SOURCE=twitter_enha SYMBOL=10GEN TIMESTAMP_UTC=25JUL11:04:00:00 BULLISH_INTENSITY=0&lt;BR /&gt;BEARISH_INTENSITY=0 BULL_MINUS_BEAR=0 BULL_SCORED_MESSAGES=0 BEAR_SCORED_MESSAGES=0&lt;BR /&gt;BULL_BEAR_MSG_RATIO=0 TOTAL_SCANNED_MESSAGES=5 year=. _ERROR_=1 _N_=10&lt;BR /&gt;NOTE: Invalid argument to function YEAR(1627272000) at line 321 column 21.&lt;BR /&gt;SOURCE=twitter_enha SYMBOL=10GEN TIMESTAMP_UTC=26JUL11:04:00:00 BULLISH_INTENSITY=0&lt;BR /&gt;BEARISH_INTENSITY=0 BULL_MINUS_BEAR=0 BULL_SCORED_MESSAGES=0 BEAR_SCORED_MESSAGES=0&lt;BR /&gt;BULL_BEAR_MSG_RATIO=0 TOTAL_SCANNED_MESSAGES=1 year=. _ERROR_=1 _N_=11&lt;BR /&gt;NOTE: Invalid argument to function YEAR(1627444800) at line 321 column 21.&lt;BR /&gt;SOURCE=twitter_enha SYMBOL=10GEN TIMESTAMP_UTC=28JUL11:04:00:00 BULLISH_INTENSITY=0&lt;BR /&gt;BEARISH_INTENSITY=0 BULL_MINUS_BEAR=0 BULL_SCORED_MESSAGES=0 BEAR_SCORED_MESSAGES=0&lt;BR /&gt;BULL_BEAR_MSG_RATIO=0 TOTAL_SCANNED_MESSAGES=4 year=. _ERROR_=1 _N_=12&lt;BR /&gt;NOTE: Invalid argument to function YEAR(1627531200) at line 321 column 21.&lt;BR /&gt;SOURCE=twitter_enha SYMBOL=10GEN TIMESTAMP_UTC=29JUL11:04:00:00 BULLISH_INTENSITY=0&lt;BR /&gt;BEARISH_INTENSITY=0 BULL_MINUS_BEAR=0 BULL_SCORED_MESSAGES=0 BEAR_SCORED_MESSAGES=0&lt;BR /&gt;BULL_BEAR_MSG_RATIO=0 TOTAL_SCANNED_MESSAGES=2 year=. _ERROR_=1 _N_=13&lt;BR /&gt;NOTE: Invalid argument to function YEAR(1627617600) at line 321 column 21.&lt;BR /&gt;SOURCE=twitter_enha SYMBOL=10GEN TIMESTAMP_UTC=30JUL11:04:00:00 BULLISH_INTENSITY=1.63&lt;BR /&gt;BEARISH_INTENSITY=0 BULL_MINUS_BEAR=1.63 BULL_SCORED_MESSAGES=1 BEAR_SCORED_MESSAGES=0&lt;BR /&gt;BULL_BEAR_MSG_RATIO=0 TOTAL_SCANNED_MESSAGES=6 year=. _ERROR_=1 _N_=14&lt;BR /&gt;NOTE: Invalid argument to function YEAR(1627790400) at line 321 column 21.&lt;BR /&gt;SOURCE=twitter_enha SYMBOL=10GEN TIMESTAMP_UTC=01AUG11:04:00:00 BULLISH_INTENSITY=0&lt;BR /&gt;BEARISH_INTENSITY=0 BULL_MINUS_BEAR=0 BULL_SCORED_MESSAGES=0 BEAR_SCORED_MESSAGES=0&lt;BR /&gt;BULL_BEAR_MSG_RATIO=0 TOTAL_SCANNED_MESSAGES=2 year=. _ERROR_=1 _N_=15&lt;BR /&gt;NOTE: Invalid argument to function YEAR(1627876800) at line 321 column 21.&lt;BR /&gt;SOURCE=twitter_enha SYMBOL=10GEN TIMESTAMP_UTC=02AUG11:04:00:00 BULLISH_INTENSITY=0&lt;BR /&gt;BEARISH_INTENSITY=0 BULL_MINUS_BEAR=0 BULL_SCORED_MESSAGES=0 BEAR_SCORED_MESSAGES=0&lt;BR /&gt;BULL_BEAR_MSG_RATIO=0 TOTAL_SCANNED_MESSAGES=2 year=. _ERROR_=1 _N_=16&lt;BR /&gt;NOTE: Invalid argument to function YEAR(1628136000) at line 321 column 21.&lt;BR /&gt;SOURCE=twitter_enha SYMBOL=10GEN TIMESTAMP_UTC=05AUG11:04:00:00 BULLISH_INTENSITY=0&lt;BR /&gt;BEARISH_INTENSITY=0 BULL_MINUS_BEAR=0 BULL_SCORED_MESSAGES=0 BEAR_SCORED_MESSAGES=0&lt;BR /&gt;BULL_BEAR_MSG_RATIO=0 TOTAL_SCANNED_MESSAGES=2 year=. _ERROR_=1 _N_=17&lt;BR /&gt;NOTE: Invalid argument to function YEAR(1628222400) at line 321 column 21.&lt;BR /&gt;SOURCE=twitter_enha SYMBOL=10GEN TIMESTAMP_UTC=06AUG11:04:00:00 BULLISH_INTENSITY=0&lt;BR /&gt;BEARISH_INTENSITY=0 BULL_MINUS_BEAR=0 BULL_SCORED_MESSAGES=0 BEAR_SCORED_MESSAGES=0&lt;BR /&gt;BULL_BEAR_MSG_RATIO=0 TOTAL_SCANNED_MESSAGES=4 year=. _ERROR_=1 _N_=18&lt;BR /&gt;NOTE: Invalid argument to function YEAR(1636171200) at line 321 column 21.&lt;BR /&gt;SOURCE=twitter_enha SYMBOL=10GEN TIMESTAMP_UTC=06NOV11:04:00:00 BULLISH_INTENSITY=0&lt;BR /&gt;BEARISH_INTENSITY=2.83 BULL_MINUS_BEAR=-2.83 BULL_SCORED_MESSAGES=0 BEAR_SCORED_MESSAGES=1&lt;BR /&gt;BULL_BEAR_MSG_RATIO=0 TOTAL_SCANNED_MESSAGES=1 year=. _ERROR_=1 _N_=19&lt;BR /&gt;NOTE: Invalid argument to function YEAR(1636347600) at line 321 column 21.&lt;BR /&gt;WARNING: Limit set by ERRORS= option reached. Further errors of this type will not be printed.&lt;BR /&gt;SOURCE=twitter_enha SYMBOL=10GEN TIMESTAMP_UTC=08NOV11:05:00:00 BULLISH_INTENSITY=0&lt;BR /&gt;BEARISH_INTENSITY=2.83 BULL_MINUS_BEAR=-2.83 BULL_SCORED_MESSAGES=0 BEAR_SCORED_MESSAGES=1&lt;BR /&gt;BULL_BEAR_MSG_RATIO=0 TOTAL_SCANNED_MESSAGES=1 year=. _ERROR_=1 _N_=20&lt;BR /&gt;NOTE: Missing values were generated as a result of performing an operation on missing values.&lt;BR /&gt;Each place is given by: (Number of times) at (Line):(Column).&lt;BR /&gt;8484014 at 321:12&lt;BR /&gt;NOTE: Mathematical operations could not be performed at the following places. The results of&lt;BR /&gt;the operations have been set to missing values.&lt;BR /&gt;Each place is given by: (Number of times) at (Line):(Column).&lt;BR /&gt;8484014 at 321:21&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ERROR: Informat E8601DZ16. is incorrect for variable TIMESTAMP_UTC.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2017 18:07:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-UTC-date-time-observations-to-usable-format/m-p/326066#M271505</guid>
      <dc:creator>starky987</dc:creator>
      <dc:date>2017-01-19T18:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: Converting UTC date/time observations to usable format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-UTC-date-time-observations-to-usable-format/m-p/326067#M271506</link>
      <description>&lt;P&gt;One additional point, when I run the import code you suggested yesterday, the data imports. When I open the file within SAS after importing it and if I right click on the UTC date/time variable to look at its properties, it is listed as informat E8601DZ16, but as soon as I close the file I get&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: Informat E8601DZ16. is incorrect for variable TIMESTAMP_UTC.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could this be causing an issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2017 18:11:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-UTC-date-time-observations-to-usable-format/m-p/326067#M271506</guid>
      <dc:creator>starky987</dc:creator>
      <dc:date>2017-01-19T18:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: Converting UTC date/time observations to usable format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-UTC-date-time-observations-to-usable-format/m-p/326069#M271507</link>
      <description>&lt;P&gt;My Bad! Try:&lt;/P&gt;
&lt;PRE&gt;newvar =year( datepart(date_var));&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2017 18:17:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-UTC-date-time-observations-to-usable-format/m-p/326069#M271507</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-01-19T18:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: Converting UTC date/time observations to usable format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-UTC-date-time-observations-to-usable-format/m-p/326070#M271508</link>
      <description>&lt;P&gt;Almost there haha, sorry about all these questions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data b; set a;&lt;BR /&gt;year=year(datepart(timestamp_utc));&lt;BR /&gt;month=month(datepart(timestamp_utc));&lt;BR /&gt;day=day(datepart(timestamp_utc));&lt;BR /&gt;hour=hour(datepart(timestamp_utc));&lt;BR /&gt;minute=minute(datepart(timestamp_utc));&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the date/time variable 08APR11:04:00:00 I get the following&lt;/P&gt;&lt;P&gt;year = 2011 (correct)&lt;/P&gt;&lt;P&gt;month = 4 (correct)&lt;/P&gt;&lt;P&gt;day = 8 (correct)&lt;/P&gt;&lt;P&gt;hour = 5 (incorrect)&lt;/P&gt;&lt;P&gt;minute = 12 (incorrect)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2017 18:21:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-UTC-date-time-observations-to-usable-format/m-p/326070#M271508</guid>
      <dc:creator>starky987</dc:creator>
      <dc:date>2017-01-19T18:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: Converting UTC date/time observations to usable format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-UTC-date-time-observations-to-usable-format/m-p/326073#M271509</link>
      <description>&lt;P&gt;You missed something from my first post in this thread. Try the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;year=year(datepart(timestamp_utc));
month=month(datepart(timestamp_utc));
day=day(datepart(timestamp_utc));
hour=hour(timepart(timestamp_utc));
minute=minute(timepart(timestamp_utc));
run;
&lt;/PRE&gt;
&lt;P&gt;HTH,&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2017 18:24:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-UTC-date-time-observations-to-usable-format/m-p/326073#M271509</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-01-19T18:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: Converting UTC date/time observations to usable format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-UTC-date-time-observations-to-usable-format/m-p/326075#M271510</link>
      <description>&lt;P&gt;Alright, its working now. I just have one final question. My date is currently listed in UTC time. Is there a way to convert it to EST? I know that I can do it manually, but UTC does not account for daylight savings so it would be someone difficult to manually adjust for daylight savings each year. Does SAS have a way of accomplishing this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for all the help!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2017 18:30:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-UTC-date-time-observations-to-usable-format/m-p/326075#M271510</guid>
      <dc:creator>starky987</dc:creator>
      <dc:date>2017-01-19T18:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Converting UTC date/time observations to usable format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-UTC-date-time-observations-to-usable-format/m-p/326078#M271511</link>
      <description>&lt;P&gt;I think you may want to try importing them with a different informat then, namely E8601LZ16&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See:&amp;nbsp;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003065425.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003065425.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2017 18:43:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-UTC-date-time-observations-to-usable-format/m-p/326078#M271511</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-01-19T18:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: Converting UTC date/time observations to usable format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-UTC-date-time-observations-to-usable-format/m-p/326088#M271512</link>
      <description>&lt;P&gt;With the new informat, I get the error "invalid data for timestamp_utc." This occurs for all observations and occurs regardless of whether or not I&amp;nbsp;use&amp;nbsp;&lt;SPAN&gt;E8601LZ16 or&amp;nbsp;E8601LZ.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2017 19:25:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-UTC-date-time-observations-to-usable-format/m-p/326088#M271512</guid>
      <dc:creator>starky987</dc:creator>
      <dc:date>2017-01-19T19:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: Converting UTC date/time observations to usable format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-UTC-date-time-observations-to-usable-format/m-p/326099#M271513</link>
      <description>&lt;P&gt;My misunderstanding of your data. Use the informat I originally suggested, but then subtract the number of secons&amp;nbsp;from the value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS datetimes represent the number of seconds since January 1, 1960.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Take a look at:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/Is-there-a-way-to-convert-time-from-EST-to-GMT/td-p/128851" target="_blank"&gt;https://communities.sas.com/t5/Base-SAS-Programming/Is-there-a-way-to-convert-time-from-EST-to-GMT/td-p/128851&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2017 19:54:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-UTC-date-time-observations-to-usable-format/m-p/326099#M271513</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-01-19T19:54:35Z</dc:date>
    </item>
  </channel>
</rss>

