cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
Stokes
Level IV

JSL: automatic pull today's date and build into the script questions

Hi, in my current JSL script, there is a phrase to define the start date of data pull, it is below,

 

START_DATE = "03Apr2019_19_19_34";

 

I hope to replace "01Mar2019_19_19_34" into "today's date".

Basically whenever open the JSL, I hope this "01Mar2019_19_19_34" will be automatically updated into the current date/time.

Also, I hope to still keep the same format of "01Mar2019_19_19_34".

Is there a way to do it?
Thanks

5 REPLIES 5
uday_guntupalli
Level VIII

Re: JSL: automatic pull today's date and build into the script questions

@Stokes , 
      Maybe something like this ? I am assuming that you want the script to always use the current date because you did not specify what that value needs to take. 

 

START_DATE = "03Apr2019_19_19_34";

CurrTime = As Date(Today()); 

CurrTimeChar = Char(CurrTime); 

Left = Words(CurrTimeChar,":"); 

Date = Left[1]; 

DesDate = Date || "_" || Char(Hour(CurrTime)) || "_" || Char(Minute(CurrTime)) || "_"|| Char(Second(CurrTime)); 

START_DATE = DesDate; 
Best
Uday
Stokes
Level IV

Re: JSL: automatic pull today's date and build into the script questions

Thanks for the help

Re: JSL: automatic pull today's date and build into the script questions

Here is a more succinct solution:

 

START_DATE = Substitute( Format( Today(), "ddMonyyyy:h:m:s" ), ":", "_" );
vince_faller
Super User (Alumni)

Re: JSL: automatic pull today's date and build into the script questions

Can I ask why you want to do this?  Are you trying to make a start time in a gui update?

Vince Faller - Predictum
Stokes
Level IV

Re: JSL: automatic pull today's date and build into the script questions

Thanks for all help, I use this function to automatically update the date in my script so I can get the updated data from "today"