I have advanced custom field date picker form which I need to separate the day (monday,tuesday etc).Is this possible ,if yes anyone please tell me how?
<p><strong>15-2-2014 Saturday</strong></p>
this is my html code
I have advanced custom field date picker form which I need to separate the day (monday,tuesday etc).Is this possible ,if yes anyone please tell me how?
<p><strong>15-2-2014 Saturday</strong></p>
this is my html code
You must be logged in to post a comment.
If You are using PHP then use below code:-
this will give You 15 as output.
Try this. If the date format is yymmdd, then the following works.
Find the ACF doc: ACF Datepicker
edit:
If you are using
get_field()
to get the date and it is in the format you showed, then it’s still a string. You’d do this:the
preg_replace
may or may not be necessary depending on whether or not those html tags are really there, but it will work regardless. But if they aren’t there, then it can be simplified to