<?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: JMP 16: Add Timestamp to Excel File Name in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JMP-16-Add-Timestamp-to-Excel-File-Name/m-p/607909#M80942</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Create Excel Workbook( "C:/Users/" || date || "FileName.xlsx",tableList,sheetList);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;The&amp;nbsp; || operator allows you to concatenate strings.&lt;/P&gt;</description>
    <pubDate>Fri, 03 Mar 2023 13:58:22 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2023-03-03T13:58:22Z</dc:date>
    <item>
      <title>JMP 16: Add Timestamp to Excel File Name</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-16-Add-Timestamp-to-Excel-File-Name/m-p/607592#M80921</link>
      <description>&lt;P&gt;I am exporting jmp data tables to Excel using the script below,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="times new roman,times"&gt;//Specifying Data Tables For Export to Excel&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="times new roman,times"&gt;tableList = {tab1DT,tab2DT,tab3DT,tab4DT,tab5DT,tab6DT};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="times new roman,times"&gt;//Specifying the Worksheets in the Excel Workbook&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="times new roman,times"&gt;sheetList = {"WS1","WS2","WS3","WS4","WS5","WS6"};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="times new roman,times"&gt;//Send to Excel FIle&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="times new roman,times"&gt;Create Excel Workbook( "C:/Users/FileName.xlsx",tableList,sheetList);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="times new roman,times"&gt;Right now the Excel file name will be FileName.xlsx. I would like to add the timestamp (Format YYYYMMDDHHMM) at the beginning of the file name so for example, 202303021550 FileName.xlsx. Will the Timestamp at Start function accomplish this? Not sure how to apply.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:31:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-16-Add-Timestamp-to-Excel-File-Name/m-p/607592#M80921</guid>
      <dc:creator>WoHNY</dc:creator>
      <dc:date>2023-06-08T16:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: JMP 16: Add Timestamp to Excel File Name</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-16-Add-Timestamp-to-Excel-File-Name/m-p/607725#M80934</link>
      <description>&lt;P&gt;Many different ways of doing this and which to use depends where you are getting your timestamp, your JMP version and your regional settings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure if JMP will recognize that format so you might have to build it by using different functions. One option is to first build it as something JMP will recognize and then use Substitute (or Regex) to remove unnecessary characters. Format Pattern only works if you have JMP16+&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
date_str = Format(Today(), "Format Pattern","&amp;lt;YYYY&amp;gt;&amp;lt;-&amp;gt;&amp;lt;MM&amp;gt;&amp;lt;-&amp;gt;&amp;lt;DD&amp;gt; &amp;lt;hh24&amp;gt;&amp;lt;::&amp;gt;&amp;lt;mm&amp;gt;");

//using regex
date_cleaned = Regex(date_str, "[^\d]", "", GLOBALREPLACE);

//using subsitute
date_cleaned = Substitute(date_str, ".", "", ":", "", "-", "", " ", "");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Quite often when I'm saving filenames with timestamp from JMP, I will just use Char(Today()) which will then be seconds from 1904-01-01 00:00:00&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 06:16:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-16-Add-Timestamp-to-Excel-File-Name/m-p/607725#M80934</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-03-03T06:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: JMP 16: Add Timestamp to Excel File Name</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-16-Add-Timestamp-to-Excel-File-Name/m-p/607887#M80940</link>
      <description>&lt;P&gt;Jarmo: Thank you for the response. If I go with Char(Today()) how do I reference it in the path/file name? Whatever I place prior to FileName.xlsx in the path/name string below will just add as is to the FileName. Define&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;date = Char(Today()) but then how do I get this incorporated into the file name? is there a special character that will reference it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Create Excel Workbook( "C:/Users/FileName.xlsx",tableList,sheetList);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 Mar 2023 13:54:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-16-Add-Timestamp-to-Excel-File-Name/m-p/607887#M80940</guid>
      <dc:creator>WoHNY</dc:creator>
      <dc:date>2023-03-03T13:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: JMP 16: Add Timestamp to Excel File Name</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-16-Add-Timestamp-to-Excel-File-Name/m-p/607909#M80942</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Create Excel Workbook( "C:/Users/" || date || "FileName.xlsx",tableList,sheetList);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;The&amp;nbsp; || operator allows you to concatenate strings.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 13:58:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-16-Add-Timestamp-to-Excel-File-Name/m-p/607909#M80942</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-03-03T13:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: JMP 16: Add Timestamp to Excel File Name</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-16-Add-Timestamp-to-Excel-File-Name/m-p/607923#M80943</link>
      <description>&lt;P&gt;Jim:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the input.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 14:49:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-16-Add-Timestamp-to-Excel-File-Name/m-p/607923#M80943</guid>
      <dc:creator>WoHNY</dc:creator>
      <dc:date>2023-03-03T14:49:47Z</dc:date>
    </item>
  </channel>
</rss>

