cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
Risslemc
Level II

Insert Current Date in Output Table

JSL Gurus!

 

I need your help trying to change the name of a JOIN output table.

 

I'm in the process of scripting a JOIN from last month's file and this month's file. I'd like the output to be renamed to "Main Table" and the current month (201706).

 

Ex: "Main Table 201706"

 

Is this possible?

 

To be discussed later, when I get to next month I'll make that new file (Main Table 201706) the current dt, join 201707 and output table "Main Table 201707" and so on...

 

Any help is appreciated!

 

1 ACCEPTED SOLUTION

Accepted Solutions
pmroz
Super User

Re: Insert Current Date in Output Table

Here's one way to do it.  I created a little table to use as an example.

dt = New Table( "Untitled 10", Add Rows( 2 ), 
		New Column( "Column 1", Numeric, Continuous, Format( "Best", 12 ),
		Set Values( [1, 2] )
	)
);

tbl_name = "Main Table " || substr(format(today(), "yyyymmdd"), 1, 6);

dt << set name(tbl_name);

View solution in original post

3 REPLIES 3
pmroz
Super User

Re: Insert Current Date in Output Table

Here's one way to do it.  I created a little table to use as an example.

dt = New Table( "Untitled 10", Add Rows( 2 ), 
		New Column( "Column 1", Numeric, Continuous, Format( "Best", 12 ),
		Set Values( [1, 2] )
	)
);

tbl_name = "Main Table " || substr(format(today(), "yyyymmdd"), 1, 6);

dt << set name(tbl_name);
Risslemc
Level II

Re: Insert Current Date in Output Table

Thanks pmroz, that works!!!
txnelson
Super User

Re: Insert Current Date in Output Table

FYI,

The 

dt << set name(tbl_name);

message and all other data table messages that are available are documented with examples in:

     Help==>Scripting Index

And to be more specific your question

     Help==>Scripting Index==>Data Table

Jim