Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chester McLaughlin

    (@chetmac)

    This is un-tested code, but it’s how I use it:

    
    <?php
    $event = $post->AirpressCollection[0];
    $sDate = new DateTime($event["Start"]);
    $eDate = new DateTime($event["End"]);
    echo $sDate->format("Y-m-d H:i:s");
    echo $eDate->format("Y-m-d H:i:s");
    ?>
    

    Is that what you’re asking? If not, show me what you currently do and I’ll try again.

    More date formatting options here:
    http://php.net/manual/en/function.date.php

    Thread Starter mcloone

    (@mcloone)

    Ahh got it, I forgot I could just turn it into a date object hah

    • This reply was modified 9 years, 2 months ago by mcloone.
Viewing 2 replies - 1 through 2 (of 2 total)

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