<?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 Reading Datetime and Timezone value as Character in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-Datetime-and-Timezone-value-as-Character/m-p/849913#M335941</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I'm facing an issue with reading datetime and timezone value into SAS as a character.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data a;&lt;BR /&gt;input abc : $100.;&lt;BR /&gt;informat abc $100.;&lt;BR /&gt;format abc $100.;&lt;BR /&gt;cards;&lt;BR /&gt;2023-11-11 11:06:35.140028 America/New_York&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I execute the above, SAS is not reading the entire value. It is just reading the date. Could anyone please help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Dec 2022 16:53:40 GMT</pubDate>
    <dc:creator>atinytale</dc:creator>
    <dc:date>2022-12-15T16:53:40Z</dc:date>
    <item>
      <title>Reading Datetime and Timezone value as Character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Datetime-and-Timezone-value-as-Character/m-p/849913#M335941</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I'm facing an issue with reading datetime and timezone value into SAS as a character.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data a;&lt;BR /&gt;input abc : $100.;&lt;BR /&gt;informat abc $100.;&lt;BR /&gt;format abc $100.;&lt;BR /&gt;cards;&lt;BR /&gt;2023-11-11 11:06:35.140028 America/New_York&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I execute the above, SAS is not reading the entire value. It is just reading the date. Could anyone please help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 16:53:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Datetime-and-Timezone-value-as-Character/m-p/849913#M335941</guid>
      <dc:creator>atinytale</dc:creator>
      <dc:date>2022-12-15T16:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Datetime and Timezone value as Character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Datetime-and-Timezone-value-as-Character/m-p/849916#M335942</link>
      <description>&lt;P&gt;Because you told it to use LIST MODE input by using the colon modifier in the INPUT statement it stopped at the first delimiter character, space.&amp;nbsp; Use FORMATTED MODE input.&amp;nbsp; But you might want to add an INFILE statement so you can add the TRUNCOVER option since data lines are a always a multiple of 80 bytes long.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note there is no need to attach either an informat or a format to that variable.&amp;nbsp; SAS does not need to be given special instructions for how to read or write normal strings.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
  infile cards truncover;
  input abc $100.;
cards;
2023-11-11 11:06:35.140028 America/New_York
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Dec 2022 17:02:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Datetime-and-Timezone-value-as-Character/m-p/849916#M335942</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-12-15T17:02:19Z</dc:date>
    </item>
  </channel>
</rss>

