# CDate

## `CDate` (FB)

FUNCTION\_BLOCK CDate

### Kurzbeschreibung

> Konvertierung der Datumskomponenten Tag/Monat/Jahr in ein Datum (YYYYMMDD)

### Darstellung

<figure><img src="/files/Wa4vI41ADQ1pykVsZ7Q1" alt=""><figcaption></figcaption></figure>

### Schnittstellen

#### Eingänge

#### Ausgänge

| Name          | Datentyp | Wertebereich | Initialwert | Funktion                 |
| ------------- | -------- | ------------ | ----------- | ------------------------ |
| *datYYYYMMDD* | DATE     |              |             | Datum im Format YYYYMMDD |

#### Sollwerte / Parameter

| Name      | Datentyp | Wertebereich | Initialwert | Funktion                                          |
| --------- | -------- | ------------ | ----------- | ------------------------------------------------- |
| **iDD**   | INT      |              | 1           | Festlegung des Tages im Format DD (1..31)         |
| **iMM**   | INT      |              | 1           | Festlegung des Monats im Format MM (1..12)        |
| **iYYYY** | INT      |              | 1970        | Festlegung des Jahres im Format YYYY (1970..2099) |

### Funktionsbeschreibung

#### Allgemeines

Dieser Funktionsbaustein dient zur Bildung des Datums *datYYYYMMDD* aus den Einzelkomponenten **iDD**, **iMM**, und **iYYYY**.\
Die logischen Eingabegrenzen der Einzelkomponenten werden überwacht und ggf. korrigiert.\
Dieser Baustein kann z.B. für die Eingabe in einer Visualisierung genutzt werden.

### CODESYS

InOut:

| Scope       | Name          | Type   | Initial |
| ----------- | ------------- | ------ | ------- |
| Input Const | `iDD`         | `INT`  | 1       |
| Input Const | `iMM`         | `INT`  | 1       |
| Input Const | `iYYYY`       | `INT`  | 1970    |
| Output      | `datYYYYMMDD` | `DATE` |         |


---

# 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-library/functionblocks/general/cdate.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.
