wpdb – How do I change the datetime format from ( ‘y-m-d’ ) to ( ‘d m y’ )
I have code that finds the date a page was last updated:
<?php global $wpdb; $psm_mod_datetime = $wpdb->get_var("SELECT post_modified FROM $wpdb->posts WHERE post_title="Current Chapter Volunteer Openings""); echo("Updated: " . substr($psm_mod_datetime, 0, 10)); ?>
which prints Updated: 2021-09-05 after the page title. I need it to print Updated: 05 September 2021
How do I change the format for the date?