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?
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; DesDate = Date || "_" || Char(Hour(CurrTime)) || "_" || Char(Minute(CurrTime)) || "_"|| Char(Second(CurrTime)); START_DATE = DesDate;
Here is a more succinct solution:
START_DATE = Substitute( Format( Today(), "ddMonyyyy:h:m:s" ), ":", "_" );
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"
There are no labels assigned to this post.