PHP : Format Tanggal menggunakan fungsi date() , strtotime()

Posted on Updated on


Hasilnya menjadi ’24-02-1991′
$format = date('d-m-Y', strtotime($tanggal ));
echo $format;

Hasilnya menjadi ’24 Februari 1991′
$format1 = date('d F Y', strtotime($tanggal ));
echo $format1;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s