Viewing 1 replies (of 1 total)
  • Plugin Author Matt Gibbs

    (@mgibbs189)

    It’s the same way you format a non-loop date field. You run the value through the date() / strtotime() functions.

    $loop_field = CFS()->get( 'my_loop' );
    foreach ( $loop_field as $row ) {
        $formatted_date = date( 'Y', strtotime( $row['the_date_field'] ) );
    }
Viewing 1 replies (of 1 total)

The topic ‘Format date within loop’ is closed to new replies.