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

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

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

ios - I get the error Property '...' not found on object of type '...' -