开发者

Outputting wordpress custom date field in different format

开发者 https://www.devze.com 2023-01-14 00:16 出处:网络
Okay, so I have a custom date field set up as \'m/d/Y H:i:s\' and I开发者_运维问答\'d like to echo that as \'M j\'. How do I do this?if it stored in the format m/d/Y H:i:s, then you can do this wherev

Okay, so I have a custom date field set up as 'm/d/Y H:i:s' and I开发者_运维问答'd like to echo that as 'M j'. How do I do this?


if it stored in the format m/d/Y H:i:s, then you can do this wherever the date is echoed in your template:

echo date('M j',strtotime($custom_date));
0

精彩评论

暂无评论...
验证码 换一张
取 消