---
title: "date:format — Format timestamp"
description: "iXML command date:format: Format timestamp."
canonical_url: "https://www.zeyos.com/ixml/ref/date-format"
markdown_url: "https://www.zeyos.com/ai/guide/ixml/ref/date-format.md"
section: "ixml-reference"
authority: "reference"
language: "en"
source_repository: "https://cloud.zeyos.com/__doc/ixmldoc.xml"
source_sha256: "a23f04e6a98628ca3c273c3b8dd2c33c034cfda3e0f00478d8793074fd2f70dd"
---

# date:format — Format timestamp

DATE:FORMAT returns the formatted representation of a timestamp according to a given PHP-compatible format.

Timestamps are based on Unix time, defined as the number of seconds elapsed since midnight proleptic Coordinated Universal Time (UTC) of January 1, 1970, not counting leap seconds.

### Attributes
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| var | var |  | Result variable name |
| format | string | c | Format |
| timezone | string | (system time zone) | Time zone |

### Children
- (none)

### Parents
- (not restricted in the reference)

### Result
- binding: var; type: string

### Examples

```xml
<output>
	<date:format format="Y-m-d">946684800</date:format>
</output>

<!-- 2000-01-01 -->
```
