• Resolved Reed Sutton

    (@reedus33)


    Hello I have a custom pods field which stores date and time. I want to store the time but I do not want it displayed on the front end. I am trying to create a function to allow me to display as described here: Code Samples: Return a Calculated Value in a Pods Template – Pods Docs

    Is this on the right track?

    function return_date_only( $id ) {

    $pods = pods('rebate_applications',$id);

    $date_time = $pods->field('application_date');

    $date_only = $date_time->format(M j, Y);

    return $date_only;

    }

Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Custom function to return date without time’ is closed to new replies.