php : Menampilkan format tanggal dari Database dengan php

Oleh : Abah Razi

بسم الله الرحمن الرحيم

Setelah mengambil data dari database mysql di kolom dengan format date, kita dapat menampilkan keluaran tanggal dalam berbagai format dengan php.

Berikut daftar format dan perintahnya.


October 14, 2014	date("F d, Y",strtotime($myrow['date']));
Tuesday, October 14, 2014	date("l, F d, Y",strtotime($myrow['date']));
Oct 14, 2014	date("M d, Y",strtotime($myrow['date']));
14 October 2014	date("d F Y",strtotime($myrow['date']));
14 Oct 2014	date("d M Y",strtotime($myrow['date']));
Tue, 14 Oct 2014	date("D, d M Y",strtotime($myrow['date']));
Tuesday, the 14th of October, 2014	date("l",strtotime($myrow['date'])) . ", the " . date("jS",strtotime($myrow['date'])) . " of " . date("F, Y",strtotime($myrow['date']));

About Reza Ervani 426 Articles
Adalah pendiri programming.rezaervani.com -

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.