cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

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