Home › Forums › General Issues › Extract year and Month from date picker custom field › Reply To: Extract year and Month from date picker custom field
ACF uses a filter called acf/update_value to save the value into the database. I have set it up as a filter so you can hook in and modify the value before save, or use the value in another way.
Please read the docs about this filter to understand it with more clarity.
You would hook in using the field name or key, then use the value that was posted to do what ever you want.
in your case, you would explode the string to get the day, month and year in an array. Then save the month and array to the database using WP save functions
Is there anything in particular you don’t understand?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!