cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
WebDesignesCrow
Super User

Insert Today date in Graph Title automatically using script

Hi,

 

I want to insert today date in Graph title.

The script run daily, so I want the title date change with run date. 

I add script below but it didn't work.

Any idea how to insert today date in the graph title?

 

SendToReport(
		Dispatch(
			{},
			"Distributions",
			OutlineBox,
			{Set Title( "Distributions of last 30 days as of" & Today() )}

The log:

WebDesignesCrow_0-1660181117400.png

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
txnelson
Super User

Re: Insert Today date in Graph Title automatically using script

There are a couple of issues.

  1. The & is not the concatenation syntax.  two vertical bars is what is used    ||
  2. The Today() function does not return a string, it return a numeric value, which is the number of seconds since Jan 1, 1904.  You need to use a Format() function to convert the Today() function.    Format(today(),"m/d/y", 10 )
Jim

View solution in original post

WebDesignesCrow
Super User

Re: Insert Today date in Graph Title automatically using script

Splendid !

Thanks, it solved the problem.

WebDesignesCrow_0-1660185021990.png

Dispatch(
			{},
			"Distributions",
			OutlineBox,
			{Set Title( "Distributions for last 30 days as of " || format(today(),"d/m/y",10); )}
		),

 

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Insert Today date in Graph Title automatically using script

There are a couple of issues.

  1. The & is not the concatenation syntax.  two vertical bars is what is used    ||
  2. The Today() function does not return a string, it return a numeric value, which is the number of seconds since Jan 1, 1904.  You need to use a Format() function to convert the Today() function.    Format(today(),"m/d/y", 10 )
Jim
WebDesignesCrow
Super User

Re: Insert Today date in Graph Title automatically using script

Splendid !

Thanks, it solved the problem.

WebDesignesCrow_0-1660185021990.png

Dispatch(
			{},
			"Distributions",
			OutlineBox,
			{Set Title( "Distributions for last 30 days as of " || format(today(),"d/m/y",10); )}
		),

 

Recommended Articles