<?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: Save File with Fil Name and date/month/year and time in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Save-File-with-Fil-Name-and-date-month-year-and-time/m-p/415732#M66482</link>
    <description>&lt;P&gt;It seems like your local date format uses / as the seperator and that is not allowed in file names. Throw in a substitute to replace "/" with "-".&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;regex(format(timestamp,"yyyy-mm-ddThh:mm:ss"),"[-:]",".",GLOBALREPLACE)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;timestamp can be today()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Sep 2021 09:27:00 GMT</pubDate>
    <dc:creator>pauldeen</dc:creator>
    <dc:date>2021-09-06T09:27:00Z</dc:date>
    <item>
      <title>Save File with Fil Name and date/month/year and time</title>
      <link>https://community.jmp.com/t5/Discussions/Save-File-with-Fil-Name-and-date-month-year-and-time/m-p/415707#M66479</link>
      <description>&lt;P&gt;Hi, everyone, i am trying to save file with file name date/month/year and time. Below is my code. But it cannot save the file. I do not see the file in the directory.&amp;nbsp; I see this error "Cannot expand path expression: $TEMP-big class_09-06-2021 2-02-16 PM.jmp". Anything wrong with my code? How to fix it?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/big class.jmp" );
dt &amp;lt;&amp;lt; Save( "$TEMP/" || Char( dt &amp;lt;&amp;lt; get name )||"_"||MDYHMS( Today() )||".jmp" );
dt &amp;lt;&amp;lt; Save ( "$TEMP/" || Char( dt &amp;lt;&amp;lt; get name )||"_"||Format Date( Today(), "ddmonyyyy h:m" )||".jmp" );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:56:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-File-with-Fil-Name-and-date-month-year-and-time/m-p/415707#M66479</guid>
      <dc:creator>bzanos</dc:creator>
      <dc:date>2023-06-09T19:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Save File with Fil Name and date/month/year and time</title>
      <link>https://community.jmp.com/t5/Discussions/Save-File-with-Fil-Name-and-date-month-year-and-time/m-p/415728#M66481</link>
      <description>&lt;P&gt;Not sure what that error message means, but I would suggest printing the possible paths you are trying to save to and check if there are some forbidden character you are trying use as the file name:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);&lt;BR /&gt;dt = Open("$SAMPLE_DATA/big class.jmp");
path1 = "$TEMP/" || Char( dt &amp;lt;&amp;lt; get name )||"_"||MDYHMS( Today() )||".jmp";
path2 = "$TEMP/" || Char(dt &amp;lt;&amp;lt; get name) || "_" || Format Date(Today(), "ddmonyyyy h:m") || ".jmp";
Show(path1, path2);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;For windows:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1630910170421.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/35544i88FFBB2D95B64520/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1630910170421.png" alt="jthi_0-1630910170421.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Sep 2021 06:36:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-File-with-Fil-Name-and-date-month-year-and-time/m-p/415728#M66481</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-09-06T06:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Save File with Fil Name and date/month/year and time</title>
      <link>https://community.jmp.com/t5/Discussions/Save-File-with-Fil-Name-and-date-month-year-and-time/m-p/415732#M66482</link>
      <description>&lt;P&gt;It seems like your local date format uses / as the seperator and that is not allowed in file names. Throw in a substitute to replace "/" with "-".&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;regex(format(timestamp,"yyyy-mm-ddThh:mm:ss"),"[-:]",".",GLOBALREPLACE)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;timestamp can be today()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Sep 2021 09:27:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-File-with-Fil-Name-and-date-month-year-and-time/m-p/415732#M66482</guid>
      <dc:creator>pauldeen</dc:creator>
      <dc:date>2021-09-06T09:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: Save File with Fil Name and date/month/year and time</title>
      <link>https://community.jmp.com/t5/Discussions/Save-File-with-Fil-Name-and-date-month-year-and-time/m-p/415964#M66521</link>
      <description>&lt;P&gt;thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 12:51:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-File-with-Fil-Name-and-date-month-year-and-time/m-p/415964#M66521</guid>
      <dc:creator>bzanos</dc:creator>
      <dc:date>2021-09-07T12:51:59Z</dc:date>
    </item>
  </channel>
</rss>

