cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.
  • See how to use JMP Pro to analyze and predict using entire data set rather than selected points in a curve. Register for Nov. 6 Mastering JMP.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Isabel26
Level III

auto fill today's date into data table name

I need to save as data table to xlsx AND auto adding today's date. For example, file name will be "old name 3/8/2022.xlsx" if I run the script on 3/8/2022, and  "old name 3/9/2022.xlsx" if I run the script on 3/9/2022. This is easy to do in SAS, and I assume JMP will be similar. Not sure how to fix the code. thanks

 

Data Table( "old name" ) << Save( "C:\old name || Today().xlsx" );

1 ACCEPTED SOLUTION

Accepted Solutions
Jeff_Perkinson
Community Manager Community Manager

Re: auto fill today's date into data table name

You need to Format the date:

 

Format( Today(), "ddMonYYYY" );

 

Two things to note:

  1. You don't need Char() since Format() returns a character string.
  2. Avoid the formats that contain slashes (/) since they are used as directory delimiters.  
-Jeff

View solution in original post

4 REPLIES 4
ron_horne
Super User (Alumni)

Re: auto fill today's date into data table name

Hi @Isabel26 

perhaps this will work:

Data Table( "old name" ) << Save( "C:\old name "|| char (Today())||".xlsx" );

 

Isabel26
Level III

Re: auto fill today's date into data table name

Thanks! But the date is not format in MM/DD/YYYY. It returns 3729589915. 

Jeff_Perkinson
Community Manager Community Manager

Re: auto fill today's date into data table name

You need to Format the date:

 

Format( Today(), "ddMonYYYY" );

 

Two things to note:

  1. You don't need Char() since Format() returns a character string.
  2. Avoid the formats that contain slashes (/) since they are used as directory delimiters.  
-Jeff
Isabel26
Level III

Re: auto fill today's date into data table name

Thank you! It worked perfectly.

Recommended Articles