# AddLeadingZero

## `AddLeadingZero` (FUN)

FUNCTION AddLeadingZero : BOOL

Use this function to add a leading zero to numeric values < 10.\
This is mainly used for two digit date variables.\
\
Usage:

* Pass the address to the variable which holds the digit value puiInput.
* Write the result as a string to the referenced value psResult.

–> If the value is >= 10 it retuns the value as it is as a string.\
–> If the value is < 10 it adds a leading zero to the returned result as a string.<br>

InOut:

| Scope  | Name             | Type                 |
| ------ | ---------------- | -------------------- |
| Return | `AddLeadingZero` | `BOOL`               |
| Input  | `puiInput`       | POINTER TO UINT      |
| Input  | `psResult`       | POINTER TO STRING(2) |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.powerio.com/hub/codesys-hvac/hvac-csv-library/funktionen/addleadingzero.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
