Share this page

# lr_save_timestamp

Saves the current time in a parameter.

    int lr_save_timestamp( const char* tmstampParam, [DIGITS,] LAST );

Alphabetical Listing - C Language Utility Functions

## Arguments

Name | Comments
--- | ---
tmstampParam | The name of the parameter to store the timestamp.
DIGITS | Optional. The number of digits for the timestamp (integer). The default is 13. With DIGITS=13, the resolution is epoch time including milliseconds. The milliseconds are the last three digits. With DIGITS=10, the resolution is in seconds. If the value of DIGITS is less than 1 or more than 16, the default is used

lr_save_timestamp saves the current local timestamp of the computer running the script.

The timestamp cannot be stored as an integer or long integer.

## Return Values

Returns LR_PASS (0) on success. Non-zero return value indicates failure.

## Parameterization

You cannot use standard parameterization for any arguments in this function.

## Example

In this example, the timestamp is saved with the default length of 13 characters - the epoch time plus milliseconds.

Copy code

       lr_save_timestamp("param", LAST );
       lr_output_message(lr_eval_string("{param}"));

Copy code

       lr_save_timestamp("param", "DIGITS=10", LAST );
       lr_output_message(lr_eval_string("{param}"));

Copy code

       lr_save_timestamp("param", "DIGITS=16", LAST );
       lr_output_message(lr_eval_string("{param}"));

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: