advanced code snippet search
gfazioli on 09/23/08
php date format
09/23/08 04:37am
1 person have marked this snippet as a favorite
gfazioli
Format date from yyyy-mm-dd hh:mm:ss TO yyyymmddhhmmss
/** * Formatta una data dal formato yyyy-mm-dd hh:mm:ss in yyyymmddhhmmss */function plainDate( $d ) { $pd = explode(' ', $d); $dd = explode('-', $pd[0]); $hp = explode(':', $pd[1]); return( $dd[0].$dd[1].$dd[2].$hp[0].$hp[1].$hp[2] );}
Report this snippet Tweet
Comment:
You need to login to post a comment.