Title: Date format
Last modified: December 19, 2017

---

# Date format

 *  [iamapay](https://wordpress.org/support/users/iamapay/)
 * (@iamapay)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/date-format-131/)
 * Hi !
 * I’m currently hitting the wall trying to resolve the date format issue i’m encountering
   using Custom Field Suite. I’m sure the solution is very simple, but my PHP skills
   being what they are… hm.
 * I’ve set up a few fields inside a custom widget this way :
 *     ```
       $// Echo the metadata
       $fields9 = CFS()->get( 'dates_de_publication' );
       // get the count on the repeater field
       $count9 = count( CFS()->get( 'dates_de_publication' ) );
       // begin $count conditions
       if ($fields9) {
       if ( $count9 > 1 ) { 
        // greater than 1
       echo '<p class="headingeuh">' . __( 'Dates de publication') . '<div class="pp-heading-separator line_only pp-left"> <span class="pp-separator-line"> </span> </div> </p>';
       } else {
       // less than 1
       echo '<p class="headingeuh">' . __( 'Date de publication') . '<div class="pp-heading-separator line_only pp-left"> <span class="pp-separator-line"> </span> </div> </p>';
       }
   
       foreach ( $fields9 as $field9 ) {
       echo '<li class="fildeuh">' . $field9['date_de_publication'] . '</li>';
       }	
       }
       ```
   
 * The point is to be able to display several dates (in a loop) and to pluralize
   the label when there’s more than one entry, or completely hide the label if there’s
   no entry at all. Everything works fine, except for the date format, which I can’t
   manage to display in a French format (d/m/Y).
 * Any help is appreciated !

The topic ‘Date format’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-field-suite.svg)
 * [Custom Field Suite](https://wordpress.org/plugins/custom-field-suite/)
 * [Support Threads](https://wordpress.org/support/plugin/custom-field-suite/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-field-suite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-field-suite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-field-suite/reviews/)

## Tags

 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [date](https://wordpress.org/support/topic-tag/date/)
 * [field](https://wordpress.org/support/topic-tag/field/)
 * [format](https://wordpress.org/support/topic-tag/format/)
 * [suite](https://wordpress.org/support/topic-tag/suite/)

 * 0 replies
 * 1 participant
 * Last reply from: [iamapay](https://wordpress.org/support/users/iamapay/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/date-format-131/)
 * Status: not resolved