本帖最后由 walunwine 于 2013-04-21 18:46:03 编辑

解决方案 »

  1.   


    $str="2013-04-12 13:04:18";
    $ar=explode(" ",$str);
    print_r($ar);//Array ( [0] => 2013-04-12 [1] => 13:04:18 )

    $t=explode(" ",$news->fields['news_last_modified']);
    'articledate' => $t[0],
      

  2.   

     $news_list_by_author_sql='select n.article_id,date_format(n.news_last_modified,"%Y-%m-%d") as news_last_modified , nt.news_article_name from ' . TABLE_NEWS_ARTICLES . ' n left join ' . TABLE_NEWS_ARTICLES_TEXT . ' nt on (n.article_id = nt.article_id and nt.language_id = \'' . (int)$_SESSION['languages_id'] . '\') and n.news_status = \'1\'' . ' order by n.article_id DESC limit 6 ';或者在php里面转也可以
    'articledate' => date("Y-m-d",strtotime($news->fields['news_last_modified'])),