php - Post Modified date in a formated way in WordPress -


getting post_modified date is: 2013-07-11 01:45:40.

i don't need time (01:45:40) here.

i need date portion displayed as: july 11, 2013.

i'm aware php date & time function, , aware wordpress date , time functions.

but i'm afraid can't understand how easily.

you can use php's strtotime() along date(). converts given date timestamp , back.

code:

<?php  $date = "2013-07-11 01:45:40"; $timestamp = strtotime($date);  echo date('f d, y', $timestamp); //output: july 11, 2013  ?> 

Comments

Popular posts from this blog

javascript - Unusual behaviour when drawing lots of images onto a large canvas -

how can i manage url using .htaccess in php? -

javascript - Chart.js - setting tooltip z-index -