How to get the unix timestamp for “the_date”

How can one get the unix timestamp of a published post (“the_date” or “the_time” functions) ?

Related posts

Leave a Reply

2 comments

  1. Just pass in the Epoc parameter. the_time() will output the string; get_the_time() will return it into a variable for use elsewhere.

    $timestamp = get_the_time('U');