Date Time Parameter is used to generate the current system Date/Time value. Users can add offset to the current date and set the format of displaying the date.

### Adding Date Time Parameter

The following fields need to be filled in to add the Date Time Parameter :

- Name : This field is used to set the name of the Parameter, which is used in the parameterization of the script with curly braces { } . Parameter name can be any alphanumeric string that stores the value of date.
- Format : This field is used to specify the format to be used to display the date. There are various inbuilt C library formats like %m/%d/%Y, %Y/%m/%d, etc. User can also create a custom format. In custom format if you need date time parameter in MM/DD/YYYY, you have to pass the custom value in '%m/%d/%Y' format. To do so, user can specify the required format in the textbox adjacent to the format drop-down menu.

  A list of date and time format specifiers that can be used as custom values is provided below:

  Format | Description | Example
  --- | --- | ---
  %% | The % character. | %
  %a | National abbreviated weekday name | Wed
  %A | National full weekday name | Wednesday
  %b | National abbreviated month name | Sep
  %B | National full month name | September
  %c | National representation of date and time | Sun 02 Jul 2023 05:51:20 PM IST
  %C | The Century number (00-99) | 20
  %d | Day of the month, zero-padded (01-31) | 04
  %D | Short MM/DD/YY date, equivalent to %m/%d/%y | 07/30/09
  %e | Day of the month, space-padded ( 1-31) | 4
  %F | Short YYYY-MM-DD date, equivalent to %Y-%m-%d | 2023-06-27
  %g | Week-based year, last two digits (00-99) | 23
  %G | Week-based year, with century. | 2023
  %h | The same as %b. | Sep
  %H | Hour in 24h format (00-23) | 18
  %I | Hour in 12h format (01-12) | 06
  %j | Day of the year (001-366) | 181
  %m | Month as a decimal number (01-12) | 06
  %M | Minute (00-59) | 37
  %n | Newline character ('\n') | //n
  %p | AM or PM designation | PM
  %r | 12-hour clock time | 06:25:34 PM
  %R | 24-hour HH:MM time, equivalent to %H:%M | 18:25
  %S | Second (00-61) | 02
  %s | Unix time; the number of seconds since the Unix epoch. | 1455803239
  %T | ISO 8601 time format (HH:MM:SS), equivalent to %H:%M:%S | 18:25:34
  %u | ISO 8601 weekday as number with Monday as 1 (1-7) | 2
  %U | Week number with the first Sunday as the first day of week one (00-53) | 30
  %V | ISO 8601 week number (00-53) | 12
  %w | Weekday as a decimal number with Sunday as 0 (0-6) | 5
  %W | Week number with the first Monday as the first day of week one (00-53) | 27
  %x | National date representation | 07/04/2023
  %X | National time representation | 06:25:34
  %y | Year, last two digits (00-99) | 23
  %Y | Year | 2023
  %z | The time zone offset from UTC; a leading plus sign stands for east of UTC, a minus sign for west of UTC, hours and minutes follow with two digits each and no delimiter between them. If timezone cannot be determined, no characters. | +01530
  %Z | Timezone name or abbreviation; if timezone cannot be determined, no characters | IST

- Expected Date/Time : This textbox displays the expected date as per the format selected by the user.

## Advanced

In advanced, you will see the following fields which need to be filled :

- Fixed Offset : To increase the current date/time by a certain value, use this option. User can offset by the number of days, hours, minutes, and seconds. By default, offset is zero i.e., current date and time.
- Random Offset : Enables you to specify a range of random offset values. For example, if you need your parcel to be delivered on some specific date, you can specify the delivery date between 10- 15 days of offset. The date will always pick a random offset value with 10 to 15 days offset.

### Day Type

User can have the following options :

- All Days : If this option is selected, then it displays the date calculated as it is. It does not modify the date any further.
- Working Days : If the user selects this option, then Load Test finds the closest working day for the date calculated so far. This means, if the calculated date falls on a working day then Load Test does nothing. But if the calculated date falls on a non-working day (Saturday or Sunday), Load Test finds the nearest working day.
- Non-Working Days : It identifies whether the calculated date is a non-working day or not. If yes, it does nothing. Otherwise, it offsets to the nearest non-working day in the same manner as the working day is offset.

### Updated value on

By using this field, the user indicates Load Test when to pick a new data value i.e. generated once and use this generated value for the entire session, or pick a new data value every time while Date Time Parameter is used. Users can have the following options :

- Session : If Session is selected, date/time is generated only for the first use of Date Time Parameter. Then for the entire script, the same value is used.
- Use : If the Use option is selected, the date is generated from the data file for every use of the Date Time Parameter. For example, if the user is using the Date Time Parameter 50 times in the script, then for every reference, a new data value is picked.

Unique for each session : If this checkbox is selected, it generates a unique date/time across all the NVMs and all the users.