%% Last Updated: - [[2021-04-19]] %% A variable in [[JMeter]] is a store of value that is assigned within the script, unlike [[Parameterization|parameter]]s, which are usually set externally. JMeter accepts variables in requests and most other fields. The standard format for a variable is `${variablename}`. Even parameter names and values are parsed for this format before the request is sent. Variables can also be created in the Test Plan level or via Add > Config Element > User Defined Variables. They can also be created by [[Beanshell]] scripts. Variables can be used in the path of results files in order to save timestamped results. One useful standard variable in JMeter is for timestamping. Here's an example: `${__time(YYYYMMdd_hhmmss)}` will give a timestamp in this format: `20140712_1320`. This is especially useful for time parameters passed in requests or for saving results.