You can try the date() function:
$date = get_post_meta($post->ID, 'event_start_date', true);
$day = date('d', strtotime($date)); //01-31
Another way will be DateTime:
$date = get_post_meta($post->ID, 'event_start_date', true);
$date = DateTime::createFromFormat('Y-m-d', $date);
$day = $date->format('d');
Related Posts:
- Query to sort a list by meta key first (if it exists), and show remaining posts without meta key ordered by title
- Is it safe to store a user setting you don’t want the user to ever modify as a user option?
- Add custom fields to search
- How to get users by a custom field / by user meta data?
- Auto sort the wp-admin post list by a meta key
- extend Meta Box / Document Panel
- Add multiple images to a page sidebar
- getEntityRecord without knowing the post type
- Add custom field to image editor
- How to set default metaboxes on user creation?
- Metabox nonce PHP notice
- TinyMCE in Custom Metabox not loaded after upgrading from WP 3.1.4 to WP 3.2
- How to break meta values into different items and avoid duplicates?
- ajax delete value from custom field array
- How can I sort get_users() by any value (last_name, user defined fields and more)
- Custom field for default gallery
- After moving my site from a dev subdomain, to root, all my custom meta data is gone
- Add input field to ‘Pages > Edit Page’ through functions.php
- How can I query on the year part of a complete date in a custom field?
- Gravity Forms: Create fields programmatically
- WordPress Custom Field Should be Unique. Is it possible?
- all tincymce’s switch when updating page after changing from html to text in custom metabox
- Author Page Custom Query WHERE author OR [post meta value] OR [post meta value]
- How to display Meta Field Value?
- Upcoming Event: How do I sort database by custom date field, but ignore past dates?
- What is the cleanest way to extract custom variables from a post
- Add source URL from Feed WordPress (Syndication) plugin to a custom field in post editor
- List custom taxonomy terms from custom field
- How do I create a column in Users list and display user data from custom registration field
- Display only past events on that page using Visual Composer Grid Bulider
- Better Method for Multiple Meta Boxes
- user Profile meta value as custom field
- Remove Body Classes
- Use WPbakery for own custom field [closed]
- Product Custom Fields with HTML and JS
- Add new image block, set default class name and update it using Javascript
- Add image to menu item with ACF
- Client PDF Upload (Catalogue) – Automatically update link to PDF
- Change the sort order for posts to include custom field
- Button inside Custom Meta Box triggering the Update Button
- How to load an assets based on custom field value?
- Adding auto-complete to custom gravity field not working
- Search in Archive Pages by subcategory, tag, custom field and year
- Get image url using image id
- Get categories query not working in function.php
- wordpress custom loop ascending descending posts by custom field
- Hide custom fields when empty
- Only show when content added via custom field
- Using a custom field inside a shortocde
- Add Custom Profile Field as Notes
- How add multiple wp_editor_box to new post
- Increment user meta data by 1 each time a page is visited
- Woocommerce frontend edit custom fields
- Related query shows same image in loop
- Can’t Output get_post_meta?
- Insert posting automatically based in acf field
- Data URI in custom fields
- Add specific custom fields to post formats
- Displaying an ACF list of users
- Meta value Array
- wp_editor on custom meta textarea field – images and html fails
- using custom fields on content.php file of my theme
- Hide / Show Custom field depending of the page ID (Magic Field 2)
- How to show certain data on certain interval of period
- How do I include a template file while allowing it to render its own dynamic content added via custom box?
- How to parse a huge list of users using a CRON function?
- Counting post fields
- comments_where Hook
- add_comment_meta not working properly
- how to enable custom fields in the Gutenberg post editor
- Missing Custom Fields
- Automatically Add Tags Taxonomy in Post from Custom field’s value
- How to get data from user meta custom fields created with acf-pro plugin?
- Is there any way to make a custom field for a post only if the author is a certain user?
- How to I change the value of a custom field on the home page?
- update meta field value after
- PHP and Shortcode Combination
- If metabox fields has content display content
- Retrieving Advanced Custom Field within Shortcode Function [closed]
- How to properly get popular Posts by multiple Values
- Custom fields and auto save
- Save values generated via API as custom meta fields
- Get custom fields when hover link of post
- WP Query multiple select form – meta_query help
- update_post_meta not working in action hook
- Load code for custom fields only on admin pages?
- Custom field in a shortcode?
- Group pages by custom field values
- Exclude empty fields from custom field calculation (Average)
- How to create Parent-Child relation for custom fields?
- How to check if custom field exists in this widget query
- display loop only if a post meta data exist
- How do i output images from URL’s added to the same custom field key
- Add Custom field under the post title [closed]
- Check if a field is capitalized?
- Filter Query Post by Custom Fields(by date)
- Can’t sort custom column on user.php by number / meta_value_num?
- Need to call this php function inside a modal window from text widget
- Multiple triggers when publishing, saving or updating a post in WordPress
- If possible a field ID transfom in a Custom Field?