Kamis, 31 Oktober 2013

PHP Indonesia - Facebook: Gan nanya tentang date kalo Misal mau Menampilkan ...

PHP Indonesia - Facebook
PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
Learn Adobe Illustrator CS6 Master Techniques from an Adobe Guru!

With over 25 years of experience teaching, Robert Farrell has been a trusted instructor for individuals and companies who want to improve their Adobe skills.
From our sponsors
Gan nanya tentang date kalo Misal mau Menampilkan ...
Oct 31st 2013, 09:28, by Danura Aditya

Danura Aditya 9:28am Oct 31
Gan nanya tentang date kalo Misal mau Menampilkan tanggal dan waktu hari ini kan pake
date('Y-m-d H:i:s'), nah kalo mau menampilkan data 1 Bulan lalu bagai mana ?

Gunawan Mujur Wibisono 9:33am Oct 31
strtotime()

Danura Aditya 9:34am Oct 31
gini gan ??
date('Y-m-d', strtotime('-1 month')); tini malah ke tgl 1 gan '2013-10-1';

Danura Aditya 9:46am Oct 31
gan pake ini bisa nih
$subject = strtotime('2013-10-31');
echo date("Y-m-d", strtotime("first day of last month", $subject));

tapi kalo
$subject = strtotime('2013-10-31'); ane ganti jadi
$subject = strtotime('Y-m-d'); jadi ngaco gan

Adhie Purwa Sasmita 9:47am Oct 31
mungkin seperti ini :
//$tgl mengambil tgl sekarang
$tgl=gmdate("Y-m-d", time()+60*60*7);

//$tanggal mengurangi tanggal tersebut 1 bulan yg lalu
$tanggal=strtotime('-1 month' , strtotime($tgl )) ;

//$bulan mengkonversi $tanggal k format tanggal
$bulan = date('Y-m-d' , $tanggal);

nah abis itu kau echo deh $bulan'a,
^ngga tau sih bner ap ngga :D

Danura Aditya 9:48am Oct 31
gan hasilnya '2013-10-1'

Adhie Purwa Sasmita 9:49am Oct 31
lah emg maunya ap?? d-m-Y ?? -1 month mungkin mengurangi 30hari

Danura Aditya 9:50am Oct 31
iyaa format saya Y-m-d maunya '2013-09-01';

Adhie Purwa Sasmita 10:06am Oct 31
emm kalo :
$tanggal d gnti jd

$tanggal=strtotime('first day of last month' , strtotime($tgl )) ;

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Tidak ada komentar:

Posting Komentar