cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

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