2017-11-02 19 views
0

日付選択ツールを使用してカスタムフィールドで日付を選択しました。今私は日付formateでその日付を取得し、日、月、年のように別に日付を印刷したいと思います。カスタム投稿タイプのカスタムフィールドから日付を取得して印刷する

<div class="infocou"> 

      <div class="tr_co col-xs-12"> 
       <img src="<?php echo $featured_img_url;?>" id="trian_img"> 

       <h2><a href="<?php echo $permalink_training; ?>" class="title-training"> 
       <?php echo $trainingtitle; ?></a></h2> 
       <img src="<?php echo get_template_directory_uri().'/assets/images/tran_ico.png';?>"> 
       <h3><?php echo $training_duration." ".$training_timings;?></h3><br/> 
       <h3><?php echo $training_date;?></h3><br/> 
       <h4><?php echo $training_type;?></h4> 
      </div> 
      </div> 
     <?php } ?>--> 

     <?php 

     ?> 

    <h6><?php **echo $training_date;(i want to print day of the event date here)** ?><br/><span>Sept</span></h6> 
    <div class="infocou"> 
     <h5>Introduction <br clear="hidden-sm hidden-xs" />To Programming</h5> 
     <img src="<?php echo get_template_directory_uri().'/assets/images/cour_icon.png';?>"> <i>8:00 am - 10:00 am</i><br/><br/> 
     <img src="<?php echo get_template_directory_uri().'/assets/images/cour_icon2.png';?>"> <i> Paathshaala Campus</i> 
    </div> 
+0

。人々があなたを助けてくれるようにしたい場合は、彼らがあなたを助けてくれるようにしましょう。 –

+0

現在、29112017のようなトレーニング日が表示されています。 –

答えて

3

日付変数の現在の出力だと所望の出力が何何使用echo date('D', strtotime($training_date));

関連する問題