---
title: "Konstigt med date()"
type: "forum-thread"
url: "https://www.webforum.nu/amne/php/16555-konstigt-med-date"
topic: "PHP"
topic_url: "https://www.webforum.nu/amne/php"
author: "Viking"
published: "2002-01-10T17:55:00.000Z"
updated: "2002-01-10T19:09:00.000Z"
replies: 2
views: 147
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/php/16555-konstigt-med-date"
---

# Konstigt med date()

## #1 — Viking, 2002-01-10T17:55Z

```
$d = time();

	echo date("H:m Y-m-d", $d);
```

Detta skriver ut 18:01 2002-01-10, trots att klockan är nästan tio i sju. Vad osm händer är att PHP (eller vad f-n det är) tar bort alla minuter efter den senast hela timmen (i detta fall arton (18)  ;) ). 

Nån som vet något?  :q

Permalänk: https://www.webforum.nu/p/16555

## #2 — Herman, 2002-01-10T18:01Z

i är minuter.

```
echo date("H:i Y-m-d", $d);
```

Permalänk: https://www.webforum.nu/p/325774

## #3 — Viking, 2002-01-10T19:09Z

Oj, tack!  :r

Permalänk: https://www.webforum.nu/p/325775

---

Tråden på webben: https://www.webforum.nu/amne/php/16555-konstigt-med-date
