<?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 How to use Date variable dynamically in text input in SAS VA 8.5 in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-use-Date-variable-dynamically-in-text-input-in-SAS-VA-8-5/m-p/948318#M18415</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use a Date variable dynamically in a text input object.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Requirement is, when user will select the any date from text input based on the selected date, no of day difference should come for all dates in a list table like below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Text input 10/10/2024&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Day Diff&lt;/P&gt;&lt;P&gt;08/10/2024&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/P&gt;&lt;P&gt;07/10/2024&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&lt;/P&gt;&lt;P&gt;06/10/2024&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4&lt;/P&gt;&lt;P&gt;05/10/2024&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;/P&gt;&lt;P&gt;04/10/2024&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope some one will provide the solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;S Bakshi&lt;/P&gt;</description>
    <pubDate>Mon, 21 Oct 2024 04:02:16 GMT</pubDate>
    <dc:creator>shubha1babu</dc:creator>
    <dc:date>2024-10-21T04:02:16Z</dc:date>
    <item>
      <title>How to use Date variable dynamically in text input in SAS VA 8.5</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-use-Date-variable-dynamically-in-text-input-in-SAS-VA-8-5/m-p/948318#M18415</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use a Date variable dynamically in a text input object.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Requirement is, when user will select the any date from text input based on the selected date, no of day difference should come for all dates in a list table like below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Text input 10/10/2024&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Day Diff&lt;/P&gt;&lt;P&gt;08/10/2024&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/P&gt;&lt;P&gt;07/10/2024&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&lt;/P&gt;&lt;P&gt;06/10/2024&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4&lt;/P&gt;&lt;P&gt;05/10/2024&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;/P&gt;&lt;P&gt;04/10/2024&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope some one will provide the solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;S Bakshi&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 04:02:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-use-Date-variable-dynamically-in-text-input-in-SAS-VA-8-5/m-p/948318#M18415</guid>
      <dc:creator>shubha1babu</dc:creator>
      <dc:date>2024-10-21T04:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Date variable dynamically in text input in SAS VA 8.5</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-use-Date-variable-dynamically-in-text-input-in-SAS-VA-8-5/m-p/948566#M18416</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/135779"&gt;@shubha1babu&lt;/a&gt;! You can achieve this using a combination of a parameter and an expression. Since SAS dates are the number of days since Jan 1st 1960, you can subtract two dates from each other to get the number of days between them. In Visual Analytics, this works the exact same way. Let's get started.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create a new text input control and add it to your report&lt;/LI&gt;
&lt;LI&gt;Create a new character parameter and name it "Date (DD/MM/YYYY)". This will give users a nice queue on what they should enter in the text box. You'll see how this comes into play in the next step.&lt;/LI&gt;
&lt;LI&gt;Assign the character parameter to the text input control. Note it says "Enter Date (DD/MM/YYYY)".&lt;/LI&gt;
&lt;LI&gt;Create a new expression and call it "Date Diff", then assign it a format of Float with 0 decimal places.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Parse('Date (DD/MM/YYYY)'p, 'DDMMYY10') - 'Date'n&lt;/CODE&gt;&lt;/PRE&gt;
This expression says to read the value the user entered as a date in DDMMYY10 format, then subtract it from the date in the table&lt;/LI&gt;
&lt;LI&gt;Add it to your table and you're done!&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;If for some reason you run into a problem subtracting the date, try using "TreatAs(_number_, 'Date'n)" instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://i.ibb.co/GxGrgVS/Date-Diff.gif" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 14:15:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-use-Date-variable-dynamically-in-text-input-in-SAS-VA-8-5/m-p/948566#M18416</guid>
      <dc:creator>Stu_SAS</dc:creator>
      <dc:date>2024-10-22T14:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Date variable dynamically in text input in SAS VA 8.5</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-use-Date-variable-dynamically-in-text-input-in-SAS-VA-8-5/m-p/948873#M18438</link>
      <description>Great Thanks &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;</description>
      <pubDate>Thu, 24 Oct 2024 12:08:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-use-Date-variable-dynamically-in-text-input-in-SAS-VA-8-5/m-p/948873#M18438</guid>
      <dc:creator>shubha_da</dc:creator>
      <dc:date>2024-10-24T12:08:26Z</dc:date>
    </item>
  </channel>
</rss>

