<?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 Integer to String data type conversion in JSL in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Integer-to-String-data-type-conversion-in-JSL/m-p/5052#M5051</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, This is my first post in the forums.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attempting to concatenate a number to a string for the purpose of saving a timestamp to an image name like so:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ChartName &amp;lt;&amp;lt;&amp;nbsp; save picture ("file_name" || "date" || ".png", png);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;However, JSL will not allow the date information to be concatenated because it is an integer and not a string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I gather datetime information&amp;nbsp; using&lt;/P&gt;&lt;P&gt;yyyy = year(today());&lt;/P&gt;&lt;P&gt;hh = hour(today());&lt;/P&gt;&lt;P&gt;and so on which returns integer data types.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to convert the integer datetime information to strings so that they can be concatenated with the string for the file name?&amp;nbsp; I did not see any information in the scripting guide on data type conversions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Jun 2012 18:57:54 GMT</pubDate>
    <dc:creator>senatorx</dc:creator>
    <dc:date>2012-06-12T18:57:54Z</dc:date>
    <item>
      <title>Integer to String data type conversion in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Integer-to-String-data-type-conversion-in-JSL/m-p/5052#M5051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, This is my first post in the forums.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attempting to concatenate a number to a string for the purpose of saving a timestamp to an image name like so:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ChartName &amp;lt;&amp;lt;&amp;nbsp; save picture ("file_name" || "date" || ".png", png);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;However, JSL will not allow the date information to be concatenated because it is an integer and not a string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I gather datetime information&amp;nbsp; using&lt;/P&gt;&lt;P&gt;yyyy = year(today());&lt;/P&gt;&lt;P&gt;hh = hour(today());&lt;/P&gt;&lt;P&gt;and so on which returns integer data types.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to convert the integer datetime information to strings so that they can be concatenated with the string for the file name?&amp;nbsp; I did not see any information in the scripting guide on data type conversions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2012 18:57:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Integer-to-String-data-type-conversion-in-JSL/m-p/5052#M5051</guid>
      <dc:creator>senatorx</dc:creator>
      <dc:date>2012-06-12T18:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Integer to String data type conversion in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Integer-to-String-data-type-conversion-in-JSL/m-p/5053#M5052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured it out from reading another post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;currentTime = today();&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;timeString = format(currentTime, "yyyy-mm-dd");&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ChartName &amp;lt;&amp;lt;&amp;nbsp; save picture ("file_name" || "timeString" || ".png", png);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2012 19:34:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Integer-to-String-data-type-conversion-in-JSL/m-p/5053#M5052</guid>
      <dc:creator>senatorx</dc:creator>
      <dc:date>2012-06-12T19:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: Integer to String data type conversion in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Integer-to-String-data-type-conversion-in-JSL/m-p/5054#M5053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to remove the double quotes around timeString, as it's a variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;currentTime &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;today&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;()&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;timeString &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;format&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;currentTime&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;"yyyy-mm-dd"&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;)&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;ChartName &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp; save picture &lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;"file_name"&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; timeString &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;".png"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; png&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2012 12:42:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Integer-to-String-data-type-conversion-in-JSL/m-p/5054#M5053</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2012-06-13T12:42:34Z</dc:date>
    </item>
  </channel>
</rss>

