<?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: Time comparison in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/636213#M21366</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/310639"&gt;@Eliot1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;It does not work &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Explain, please.&lt;/P&gt;</description>
    <pubDate>Tue, 31 Mar 2020 13:04:42 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-03-31T13:04:42Z</dc:date>
    <item>
      <title>Time comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/622391#M19765</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to know if my traitement finish before 09:15 AM :&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let statut = OK;

data _null_;
call symput ('timenow',put (time(),hhmm.));
run;
%put &amp;amp;timenow;
--09:08

%macro tempsko;
%if '09:15't &amp;lt;= &amp;amp;timenow %then %do;
%let statut=KO;
%end;
%mend;
%tempsko;
%put &amp;amp;statut;

-- KO ???&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thx for your help&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 09:20:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/622391#M19765</guid>
      <dc:creator>Eliot1</dc:creator>
      <dc:date>2020-02-05T09:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: Time comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/622395#M19769</link>
      <description>&lt;P&gt;Since timenow contains a string and not a number, a character comparison is used, and the single quote comes before any digit in the ASCII table. Make a time literal out of your timenow reference:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let statut = OK;

data _null_;
call symput ('timenow',put (5000,hhmm.));
run;
%put &amp;amp;timenow;

options mprint mlogic symbolgen;

%macro tempsko;
%if '09:15't &amp;lt;= "&amp;amp;timenow"t %then %do;
%let statut=KO;
%end;
%mend;
%tempsko;
%put &amp;amp;statut;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Feb 2020 09:30:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/622395#M19769</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-02-05T09:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: Time comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/622408#M19773</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let statut = OK;

data _null_;
call symput ('timenow',put (time(),hhmm.));
run;
%put &amp;amp;timenow;


%macro tempsko;
	data _null_;
	if '09:15't le "&amp;amp;timenow"t then call symput('statut','KO');
	run;
%mend;
%tempsko;

%put &amp;amp;statut;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Please let us know if this worked for you.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 11:16:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/622408#M19773</guid>
      <dc:creator>Satish_Parida</dc:creator>
      <dc:date>2020-02-05T11:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: Time comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/622501#M19778</link>
      <description>&lt;P&gt;The implied %EVAL() function call of the %IF statement does not recognize date/time/datetime literals.&amp;nbsp; Make an explicit call to %SYSEVALF()&amp;nbsp; instead.&amp;nbsp; Also you are comparing the string 09:80 to the time value '09:15't.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%if %sysevalf('09:15't &amp;lt;= "&amp;amp;timenow"t) %then %do;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Feb 2020 18:00:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/622501#M19778</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-02-05T18:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Time comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/635844#M21326</link>
      <description>&lt;P&gt;Sorry, &lt;SPAN&gt;it does not work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Une nouvelle formulation serait : Comment puis-je tester si mon traitement est passé avant 09:15 AM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thx for tour time&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2020 15:17:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/635844#M21326</guid>
      <dc:creator>Eliot1</dc:creator>
      <dc:date>2020-03-30T15:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: Time comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/635845#M21327</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Sorry, it does not work. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;A new formulation would be: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How can I test if my treatment is passed before 09:15 AM &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thx for tour time&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2020 15:19:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/635845#M21327</guid>
      <dc:creator>Eliot1</dc:creator>
      <dc:date>2020-03-30T15:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: Time comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/635851#M21328</link>
      <description>&lt;P&gt;DO NOT format macro variables.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let statut = OK;

data _null_;
call symput ('timenow',time()); /* NOTE: unformatted */
run;

%macro tempsko;
%if '09:15't &amp;lt;= &amp;amp;timenow %then %do;
%let statut=KO;
%end;
%mend;
%tempsko
%put &amp;amp;=statut;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Mar 2020 15:32:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/635851#M21328</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-03-30T15:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Time comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/635852#M21329</link>
      <description>&lt;P&gt;Show more details of what code you are using.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2020 15:36:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/635852#M21329</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-03-30T15:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Time comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/636208#M21364</link>
      <description>&lt;P&gt;It does not work &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 12:52:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/636208#M21364</guid>
      <dc:creator>Eliot1</dc:creator>
      <dc:date>2020-03-31T12:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: Time comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/636209#M21365</link>
      <description>&lt;P&gt;%let statut=OK;&lt;BR /&gt;%put &amp;amp;statut;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt;call symput ('timenow', time());&lt;BR /&gt;run;&lt;BR /&gt;%put &amp;amp;timenow;&lt;/P&gt;&lt;P&gt;%macro tempsko;&lt;BR /&gt;%if '14:40't &amp;lt;= &amp;amp;timenow %then %do;&lt;BR /&gt;%let statut=KO;&lt;BR /&gt;%end;&lt;BR /&gt;%mend;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%tempsko;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%put &amp;amp;statut;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 12:51:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/636209#M21365</guid>
      <dc:creator>Eliot1</dc:creator>
      <dc:date>2020-03-31T12:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Time comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/636213#M21366</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/310639"&gt;@Eliot1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;It does not work &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Explain, please.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 13:04:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/636213#M21366</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-03-31T13:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: Time comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/636236#M21368</link>
      <description>&lt;P&gt;This code work :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let statut = OK;
%put &amp;amp;statut;

data _null_;
&lt;STRONG&gt;call symput ('timenow', time());&lt;/STRONG&gt;
run;&lt;BR /&gt;
%macro tempsko;
&lt;STRONG&gt;%if %sysevalf('09:15't &amp;lt;= &amp;amp;timenow) %then %do;&lt;/STRONG&gt;
%let statut=KO;
%end;
%mend;

%tempsko;

%put &amp;amp;statut;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thx all for your help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 14:13:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/636236#M21368</guid>
      <dc:creator>Eliot1</dc:creator>
      <dc:date>2020-03-31T14:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: Time comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/636239#M21369</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;%EVAL() does not treat time (or other) literals as special cases, it just treats them as text strings. You need to explicitly call %SYSEVALF() instead of letting SAS do an implicit call to %EVAL().&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 14:19:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Time-comparison/m-p/636239#M21369</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-03-31T14:19:02Z</dc:date>
    </item>
  </channel>
</rss>

