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 - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -