Convert MySQL date Format to Indonesian Date Format with PHP

Below is A PHP Function to Convert MySQL date Format to Indonesian Date Format.

Example : 2010-10-10 can be 10 Oktober 2010

Below  is the Function to Convert MySQL date Format to Indonesian Date Format with PHP
javascript:void(0)

    function waktuindo($datawaktu)
    {
        $waktu=explode('-',$datawaktu);
        if ($waktu[1] == '01')  //jika 01 maka januari
            {
                $bulan='Januari';
            }
        elseif ($waktu[1] == '02')  
            {
                $bulan='Februari';
            }
        elseif ($waktu[1] == '03')  
            {
                $bulan='Maret';
            }
        elseif ($waktu[1] == '04')  
            {
                $bulan='April';
            }
        elseif ($waktu[1] == '05')  
            {
                $bulan='Mei';
            }
        elseif ($waktu[1] == '06')  
            {
                $bulan='Juni';
            }
        elseif ($waktu[1] == '07')  
            {
                $bulan='Juli';
            }
        elseif ($waktu[1] == '08')  
            {
                $bulan='Agustus';
            }
        elseif ($waktu[1] == '09')  
            {
                $bulan='September';
            }
        elseif ($waktu[1] == '10')  
            {
                $bulan='Oktober';
            }
        elseif ($waktu[1] == '11')  
            {
                $bulan='November';
            }
        elseif ($waktu[1] == '12')  
            {
                $bulan='Desember';
            }
        else  
            {
                $bulan='00';
            }
        echo"$waktu[2] $bulan $waktu[0]";
    }

  

It was a simple fuction to Convert MySQL date Format to Indonesian Date Format with PHP by myself Maybe need a correction for perfection.

Komentar FB


Probably Related Article



19 comments:

paul said...
March 19, 2010 at 2:20 AM

That's Quiet intresting and will surely try my hands on this and will do inform you will the following result. Presently Working For Windows XP Troubleshooting

marry said...
March 19, 2010 at 7:13 AM

Blogs are so informative where we get lots of information on any topic. Nice job keep it up!!
_____________________________

Architecture Dissertation

Custom t-shirts said...
March 29, 2010 at 1:36 AM

Its looking quite interesting. I am going to add this function on my new site. Thanks for the info buddy.

Rackmount Monitor said...
March 29, 2010 at 3:55 AM

Nice job buddy, i was looking for this script for so long.

!Rchymera|Blog™! said...
March 29, 2010 at 8:35 PM

Nice tutorial buddy and i like this,always succes for you and keep in touch...:D

Replica Jewelry said...
April 12, 2010 at 3:31 AM

I was searching for this script for last two months but i didn't get the reliable one. Your script is looking very reliable. I am going to put this script on my new project. Thanks for sharing such a valuable script buddy. Hope you 'll share more useful posts. I 'll wait for your updates.

high risk unsecured loans said...
July 22, 2010 at 5:01 AM

Really your tutorials are very easy to understand and they all are working, thanks..

AVG Free Edition 9.0 said...
August 2, 2010 at 9:30 AM

interesting friend, But could you please tell me how to call these functions.

Kupon Hostgator said...
August 2, 2010 at 9:55 AM

Wedeh mantep gan tutornya, sayang sy dah lupa sama php

cirrusdance said...
August 2, 2010 at 7:26 PM

interesting function, i'll try

realincomepro said...
August 5, 2010 at 12:23 AM

Keren gan infonya, save dulu ah kebetulan lagi belajar php ni

Berbagi Pengalaman said...
August 5, 2010 at 2:14 AM

Cara manggil fungsinya gimana gan

Just My Blog said...
August 6, 2010 at 10:49 AM

Mantep gan, punya yang lebih lengkap ga tentang php, baru mau blajar ni

Pest Control Toronto said...
August 22, 2010 at 2:26 AM

Its been looking quite effective. I haven't add this to my site but now i am going to add this to my site. I hope it will prove to be very useful for me.

Steve said...
March 6, 2011 at 11:24 AM

waw.... keren nih,
ternyata cukup sederhana ya cara meng-convert mysql date Format ke zona waktu indonesia...

door alarms said...
March 14, 2011 at 10:25 AM

wah info yang menarik nih, thanks banget nih atas info yang di berikan

Harry Pottar said...
March 23, 2012 at 8:12 PM

I consider what is missing is a DateTimeC, that stores accumulation in UTC, can outlet an nonobligatory timezone equilibrise, and uses these two properties unitedly with the dateFormatter and the modern locale to representation the case in the aggregation state the somebody is utilised to translate.

corporate website design

chateau angelus said...
July 11, 2012 at 1:32 AM

That's interesting and will surely try my hands on this and will do inform you will the following result. Presently Working For Windows XP Troubleshooting

Boston Concierge said...
July 11, 2012 at 1:34 AM

That's interesting and will surely try my hands on this and will do inform you will the following result. Presently Working For Windows XP Troubleshooting

Related Posts by Categories



Widget by