# Sekunden seit 1.1.2000 als Datum

**URL:** <https://community.symcon.de/t/sekunden-seit-1-1-2000-als-datum/38425>\
**Category:** Skripte, PHP, SQL (Fragen)\
**Created:** [13. Oktober 2015 um 14:08 UTC](https://community.symcon.de/t/sekunden-seit-1-1-2000-als-datum/38425 "2015-10-13T14:08:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![baba](https://community.symcon.de/letter_avatar_proxy/v4/letter/b/a5b964/32.png) [@baba](https://community.symcon.de/u/baba)\
**Post date:** [13. Oktober 2015 um 14:08 UTC](https://community.symcon.de/t/sekunden-seit-1-1-2000-als-datum/38425/1 "2015-10-13T14:08:07Z")

</div>

Hallo zusammen,

ich habe einen integer Wert „Sekunden seit 1.1.2000“  
welche ich gerne als Datum (d.m.Y) darstellen möchte.

Wie stelle ich das an? Der Unix Timestamp nimmt ja 1.1.1970 an.

Bekomme es einfach nicht hin…

Meine Idee:

```php

$firstJan2000 = mktime(00, 00, 0, 1, 1, 2000);
$value -= $firstJan2000;
$value = date("d.m.Y", time() - $value);

```

Vielen Dank!

Gruß Basti

---

<div class="post-metadata">

**Author:** ![gucky](https://community.symcon.de/user_avatar/community.symcon.de/gucky/32/6_2.png) [@gucky](https://community.symcon.de/u/gucky)\
**Post date:** [13. Oktober 2015 um 14:25 UTC](https://community.symcon.de/t/sekunden-seit-1-1-2000-als-datum/38425/2 "2015-10-13T14:25:53Z")

</div>

Versuche mal:

```php

//$value ist Sekunden seit 2000
$firstJan2000 = mktime(00, 00, 0, 1, 1, 2000);
$value += $firstJan2000;
$value = date("d.m.Y", $value);  

```

---

<div class="post-metadata">

**Author:** ![baba](https://community.symcon.de/letter_avatar_proxy/v4/letter/b/a5b964/32.png) [@baba](https://community.symcon.de/u/baba)\
**Post date:** [13. Oktober 2015 um 14:28 UTC](https://community.symcon.de/t/sekunden-seit-1-1-2000-als-datum/38425/3 "2015-10-13T14:28:57Z")

</div>

Hallo gucky,

super vielen dank, da stand ich wohl auf dem Schlauch… Mein Ansatz war wohl etwas daneben 🙂

Gruß Basti
