Increment date/time stamps in a VuGen script

If suppose today is 11-Nov and if you want to save the date of three days later in the script

Use the built-in function lr_save_datetime()

Example:
The following function will save the date of three days from now into the parameter "date."

lr_save_datetime("Three days from now is %B %d %Y", DATE_NOW + (ONE_DAY*3), "date");

To view the output of this parameter use

lr_output_message("Date is %s",lr_eval_string("{date}"));

You can increment the date time using ONE_DAY, ONE_HOUR and ONE_MIN.

READ  How to set the Summary Report to display transactions in the order of execution

1 thought on “Increment date/time stamps in a VuGen script”

  1. Hi,

    Is it possible to increment a random date ???

    For example :

    lr_save_datetime(“Three days from christmas is %d %m %Y”, atoi(“24/12/2014”) + (ONE_DAY*1), “date”);

    Reply

Leave a Comment