<?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: SAS data and time in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827883#M327016</link>
    <description>&lt;P&gt;Run this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data=&amp;lt;your dataset name&amp;gt;;
run;

data _null_;
set &amp;lt;your dataset name&amp;gt;;
if dt ne .
then do;
  put dt 20.3;
  stop;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and post the output and the complete log here.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Aug 2022 15:21:30 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2022-08-09T15:21:30Z</dc:date>
    <item>
      <title>SAS data and time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827660#M326936</link>
      <description>&lt;P&gt;I have this date time variable as below. It is shown as numeric ( Num 8, datetime16)&amp;nbsp;&lt;SPAN&gt;rather than Character.&amp;nbsp; I tried to covert it to numeric but it won't work:&amp;nbsp;DTa=input(DT,datetime16.); Any help??&lt;/SPAN&gt;&lt;/P&gt;
&lt;TABLE width="147px"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="147px"&gt;25DEC20:09:00:00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="147px"&gt;28SEP20:02:02:00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="147px"&gt;25Dec2020 7:31:00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="147px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="147px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="147px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Mon, 08 Aug 2022 17:52:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827660#M326936</guid>
      <dc:creator>desireatem</dc:creator>
      <dc:date>2022-08-08T17:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data and time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827668#M326939</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/40563"&gt;@desireatem&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have this date time variable as below. It is shown as numeric ( Num 8, datetime16)&amp;nbsp;&lt;SPAN&gt;rather than Character.&amp;nbsp; I tried to covert it to numeric but it won't work:&amp;nbsp;DTa=input(DT,datetime16.); Any help??&lt;/SPAN&gt;&lt;/P&gt;
&lt;TABLE width="147px"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="147px"&gt;25DEC20:09:00:00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="147px"&gt;28SEP20:02:02:00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="147px"&gt;25Dec2020 7:31:00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="147px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="147px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="147px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;With a type of numeric and this format, it is already a SAS datetime value, so there's no need for any conversion.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 18:53:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827668#M326939</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-08-08T18:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data and time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827672#M326941</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/40563"&gt;@desireatem&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have this date time variable as below. &lt;FONT size="5" color="#0000FF"&gt;&lt;STRONG&gt;It is shown as numeric&lt;/STRONG&gt;&lt;/FONT&gt; ( Num 8, datetime16)&amp;nbsp;&lt;SPAN&gt;rather than Character.&amp;nbsp;&lt;FONT size="5" color="#800080"&gt;&lt;STRONG&gt; I tried to covert it to numeric&lt;/STRONG&gt;&lt;/FONT&gt; but it won't work:&amp;nbsp;DTa=input(DT,datetime16.); &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If it is shown as numeric why did you think you needed to convert it to numeric???&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 19:05:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827672#M326941</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-08-08T19:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data and time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827718#M326956</link>
      <description>&lt;P&gt;I think I have to convert it to numeric because this:&amp;nbsp;&lt;SPAN&gt;25DEC20:09:00:00 is not numeric despite it state numeric. There are characters in it?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 21:45:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827718#M326956</guid>
      <dc:creator>desireatem</dc:creator>
      <dc:date>2022-08-08T21:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data and time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827719#M326957</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;I think I have to convert it to numeric because this: 25DEC20:09:00:00 is not numeric despite it state numeric. There are characters in it?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When a format (such as datetime16.) is applied to a numeric value, this changes the appearance of your numeric value and it is possible that it now appears to have non-numerics in the value, but only the appearance is changed. The value remains unchanged, and remains numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 21:51:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827719#M326957</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-08-08T21:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data and time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827721#M326958</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/40563"&gt;@desireatem&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I think I have to convert it to numeric because this:&amp;nbsp;&lt;SPAN&gt;25DEC20:09:00:00 is not numeric despite it state numeric. There are characters in it?&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is the human-readable display of the datetime value as determined by the format.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 21:51:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827721#M326958</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-08-08T21:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data and time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827724#M326960</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/40563"&gt;@desireatem&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I think I have to convert it to numeric because this:&amp;nbsp;&lt;SPAN&gt;25DEC20:09:00:00 is not numeric despite it state numeric. There are characters in it?&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT size="5"&gt;&lt;STRONG&gt;Format. Format.&lt;/STRONG&gt; Controls display. It looks like a datetime because it has a datetime format.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="5"&gt;The values don't change just because you have a format. The value type doesn't change because of the format.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="5"&gt;Formats are how SAS allows you to create meaningfull-to-human text from a value.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="5"&gt;Consider this program. You can copy and run it. The value variable is numeric. The default format is BEST12. But I override the default format to use a custom format in the Proc Tabulate report body.&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;proc format;
value weirdness
1='Some text'
2='Other text'
3='Off the wall';
run;

data junk;
  input id value;
datalines;
1 1
34 2
;

proc tabulate data=junk;
   class id;
   var value;
   table (id all='Total')*value,
        sum='Sum'*f=weirdness.;
run;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT size="5"&gt;&lt;FONT size="4"&gt;Repeat to yourself until it sinks in: the format is how values are displayed.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Or this one:&lt;/P&gt;
&lt;PRE&gt;Proc freq data=sashelp.class;
   tables name;
   format name $1.;
run;&lt;/PRE&gt;
&lt;P&gt;Which will let me know how many students start with each letter present in the data. I did not change any names. I could assign the format $1. to the variable name in a copy of the Sashelp.Class data set (bad idea to attempt to do such to the original) and you would only see by default 1 letter for each name. But the full names are still in the data set (unless you actually do change them in the copy for some reason, but the format will not do that).&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 22:26:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827724#M326960</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-08-08T22:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data and time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827763#M326965</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Either remove the format permanently in a data step or using proc datasets, or when you print it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example : removing the formats of all the variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=mydata;
format _all_;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Aug 2022 07:33:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827763#M326965</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2022-08-09T07:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data and time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827873#M327009</link>
      <description>&lt;P&gt;If there is no need for conversion, how do I convert it to SAS DateTime to use numerical computations?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 15:08:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827873#M327009</guid>
      <dc:creator>desireatem</dc:creator>
      <dc:date>2022-08-09T15:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data and time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827880#M327013</link>
      <description>&lt;P&gt;&lt;FONT size="5"&gt;&lt;U&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;YOU DO NOT HAVE TO CONVERT ANYTHING, AS IT IS ALREADY A SAS DATETIME VALUE !!!!!&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 15:15:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827880#M327013</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-08-09T15:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data and time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827881#M327014</link>
      <description>&lt;P&gt;Nothing seems to work. I want to transfer the datetime to SAS datetime so that I can use for computation, but since it is numeric when it supposed to be character, I am confused.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 15:16:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827881#M327014</guid>
      <dc:creator>desireatem</dc:creator>
      <dc:date>2022-08-09T15:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data and time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827882#M327015</link>
      <description>&lt;P&gt;Then how do I convert it to SAS datetime to use for computation?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 15:20:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827882#M327015</guid>
      <dc:creator>desireatem</dc:creator>
      <dc:date>2022-08-09T15:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data and time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827883#M327016</link>
      <description>&lt;P&gt;Run this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data=&amp;lt;your dataset name&amp;gt;;
run;

data _null_;
set &amp;lt;your dataset name&amp;gt;;
if dt ne .
then do;
  put dt 20.3;
  stop;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and post the output and the complete log here.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 15:21:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827883#M327016</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-08-09T15:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data and time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827886#M327017</link>
      <description>&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Contents: Variables" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;&lt;COLGROUP&gt; &lt;COL /&gt;&lt;/COLGROUP&gt; &lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c b header" colspan="6" scope="colgroup"&gt;Alphabetic List of Variables and Attributes&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r b header" scope="col"&gt;#&lt;/TH&gt;
&lt;TH class="l b header" scope="col"&gt;Variable&lt;/TH&gt;
&lt;TH class="l b header" scope="col"&gt;Type&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Len&lt;/TH&gt;
&lt;TH class="l b header" scope="col"&gt;Format&lt;/TH&gt;
&lt;TH class="l b header" scope="col"&gt;Label&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;1&lt;/TH&gt;
&lt;TD class="l data"&gt;MEWSO2_DT&lt;/TD&gt;
&lt;TD class="l data"&gt;Num&lt;/TD&gt;
&lt;TD class="r data"&gt;8&lt;/TD&gt;
&lt;TD class="l data"&gt;DATETIME16.&lt;/TD&gt;
&lt;TD class="l data"&gt;MEWSO2_DT&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;NOTE: PROCEDURE CONTENTS used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;140&lt;BR /&gt;141 data _null_;&lt;BR /&gt;142 set gg1;&lt;BR /&gt;143 if dt ne .&lt;BR /&gt;144 then do;&lt;BR /&gt;145 put dt 20.3;&lt;BR /&gt;146 stop;&lt;BR /&gt;147 end;&lt;BR /&gt;148 run;&lt;/P&gt;
&lt;P&gt;NOTE: Variable dt is uninitialized.&lt;BR /&gt;NOTE: There were 13 observations read from the data set WORK.GG1.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 09 Aug 2022 15:26:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827886#M327017</guid>
      <dc:creator>desireatem</dc:creator>
      <dc:date>2022-08-09T15:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data and time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827890#M327020</link>
      <description>&lt;P&gt;So your variable is NOT named DT (as you wrote it in your first post, quote:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;DTa=input(DT,datetime16.);&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;), but&amp;nbsp;MEWSO2_DT.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So let's play around with your &lt;U&gt;actual&lt;/U&gt; variable:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
set gg1;
date = datepart(MEWSO2_DT);
time = timepart(MEWSO2_DT);
dt_string = put(MEWSO2_DT,e8601dt19.);
new_dt = intnx('dtmonth',MEWSO2_DT,1,"s");
format
&amp;nbsp; date yymmdd10.
&amp;nbsp; time time8.
&amp;nbsp; new_dt e8601dt19.
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and then look at the newly created variables in dataset TEST.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 15:33:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827890#M327020</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-08-09T15:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data and time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827894#M327023</link>
      <description>&lt;P&gt;Thank you but it still does not work,&amp;nbsp;&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Contents: Variables" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;new_dt&lt;/TD&gt;
&lt;TD class="l data"&gt;Num&lt;/TD&gt;
&lt;TD class="r data"&gt;8&lt;/TD&gt;
&lt;TD class="l data"&gt;E8601DT19.&lt;/TD&gt;
&lt;TD class="l data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="l data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;Despite it added a T "&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Print: Data Set WORK.GROUP1" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;1&lt;/TH&gt;
&lt;TD class="r data"&gt;2021-01-25T07:31:00&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 09 Aug 2022 15:44:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827894#M327023</guid>
      <dc:creator>desireatem</dc:creator>
      <dc:date>2022-08-09T15:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data and time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827895#M327024</link>
      <description>&lt;P&gt;It didn't work, still saying num despite adding "T"&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Contents: Variables" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row" width="17px"&gt;&amp;nbsp;&lt;/TH&gt;
&lt;TD width="63px" class="l data"&gt;new_dt&lt;/TD&gt;
&lt;TD width="45px" class="l data"&gt;Num&lt;/TD&gt;
&lt;TD width="40px" class="r data"&gt;8&lt;/TD&gt;
&lt;TD width="101px" class="l data"&gt;E8601DT19.&lt;/TD&gt;
&lt;TD width="40px" class="l data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="40px" class="l data"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 09 Aug 2022 15:46:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827895#M327024</guid>
      <dc:creator>desireatem</dc:creator>
      <dc:date>2022-08-09T15:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data and time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827897#M327025</link>
      <description>&lt;P&gt;Don't be silly. Of course it worked, the datetime value was stored in a character string with the desired format. This is proof that you have a real SAS datetime value in &lt;SPAN&gt;MEWSO2_DT&amp;nbsp;&lt;/SPAN&gt;with which you can make all datetime-related calculations possible in SAS, without ANY prior conversion.&lt;/P&gt;
&lt;P&gt;What do you want to calculate from your datetime values?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 15:48:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827897#M327025</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-08-09T15:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data and time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827900#M327027</link>
      <description>&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Print: Data Set WORK.GROUP1" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="r header" scope="col"&gt;Obs&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;P_dta&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;m_dta&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;ORDERS_DTa&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;MEWSO2_DT&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;1&lt;/TH&gt;
&lt;TD class="r data"&gt;1924503240&lt;/TD&gt;
&lt;TD class="r data"&gt;1924506000&lt;/TD&gt;
&lt;TD class="r data"&gt;1924504020&lt;/TD&gt;
&lt;TD class="r data"&gt;25DEC20:07:31:00&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The P_dta, m_dta, orders_dta are SAS data. So you are telling me I can perform subtractions with MEWSSO2_DT despite not in the same presentation?&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 09 Aug 2022 15:57:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827900#M327027</guid>
      <dc:creator>desireatem</dc:creator>
      <dc:date>2022-08-09T15:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data and time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827908#M327031</link>
      <description>&lt;P&gt;Numbers are numbers, there is only one way to store a number in SAS, as a binary floating point value.&lt;/P&gt;
&lt;P&gt;How you DISPLAY them does not in anyway change the actual number.&lt;/P&gt;
&lt;PRE&gt;666   data test;
667     P_dta = 1924503240;
668     m_dta = 1924506000 ;
669     ORDERS_DTa= 1924504020 ;
670     MEWSO2_DT = '25DEC20:07:31:00'dt;
671     put 'Raw '/ (_all_) (= comma20./)
672       // 'DATETIME ' / (_all_) (= datetime19./)
673    ;
674   run;

Raw
P_dta=1,924,503,240
m_dta=1,924,506,000
ORDERS_DTa=1,924,504,020
MEWSO2_DT=1,924,500,660

DATETIME
P_dta=25DEC2020:08:14:00
m_dta=25DEC2020:09:00:00
ORDERS_DTa=25DEC2020:08:27:00
MEWSO2_DT=25DEC2020:07:31:00
NOTE: The data set WORK.TEST has 1 observations and 4 variables.
&lt;/PRE&gt;
&lt;P&gt;A value that is close to 2 billion seconds is going to be pretty close to the current datetime.&lt;/P&gt;
&lt;PRE&gt;659   data test;
660     now=datetime();
661     two_billion = 2E9 ;
662     put (_all_) (= datetime19./)
663      // (_all_) (= comma19./)
664   ;
665   run;

now=09AUG2022:12:30:31
two_billion=18MAY2023:03:33:20

now=1,975,667,431
two_billion=2,000,000,000
NOTE: The data set WORK.TEST has 1 observations and 2 variables.
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 16:35:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-and-time/m-p/827908#M327031</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-08-09T16:35:34Z</dc:date>
    </item>
  </channel>
</rss>

