Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Jak formatować datę pobraną z TIMESTAMP?
gruvby
post
Post #1





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 1.01.2005
Skąd: Lublin

Ostrzeżenie: (0%)
-----


A więc tak, chciałem formatować datę którą trzymam w polu typu TIMESTAMP i stworzyłem takie coś
  1. <?php
  2. $s = date(&#092;"d F Y, G:i\", $row['iDate']);
  3. $s = str_replace(&#092;"January\", \"Styczeń\", $s);
  4. $s = str_replace(&#092;"February\", \"Luty\", $s);
  5. $s = str_replace(&#092;"March\", \"Marzec\", $s);
  6. $s = str_replace(&#092;"April\", \"Kwiecień\", $s);
  7. $s = str_replace(&#092;"May\", \"Maj\", $s);
  8. $s = str_replace(&#092;"June\", \"Czerwiec\", $s);
  9. $s = str_replace(&#092;"July\", \"Lipiec\", $s);
  10. $s = str_replace(&#092;"September\", \"Wrzesień\", $s);
  11. $s = str_replace(&#092;"October\", \"Październik\", $s);
  12. $s = str_replace(&#092;"November\", \"Listopad\", $s);
  13. $s = str_replace(&#092;"December\", \"Grudzień\", $s);
  14. ?>

Jednak to coś nie wyświetla poprawnej daty a
Cytat
01 Styczeń 1970, 1:00

Z góry dziękuję za pomoc.

Ten post edytował gruvby 21.05.2005, 16:46:41
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 9.10.2025 - 17:02