JSL: automatic pull today's date and build into the script questionsHi, 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
Re: JSL: automatic pull today's date and build into the script questionsThanks for all help, I use this function to automatically update the date in my script so I can get the updated data from "today"
Re: JSL: automatic pull today's date and build into the script questionsThanks for the help
Re: JSL: automatic pull today's date and build into the script questionsCan I ask why you want to do this? Are you trying to make a start time in a gui update?
Re: JSL: automatic pull today's date and build into the script questionsHere is a more succinct solution:
START_DATE = Substitute( Format( Today(), "ddMonyyyy:h:m:s" ), ":", "_" );
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;