date('YmdHis') code example Example: show date php by letters check here link: http://www.eltcalendar.com/stuff/datemysqlphp.html