I am using DatePicker fields to date posts with the save format yymmdd (e.g., ‘20170103’). In the loop I can then sort all posts according to date. I find that using a different date format (e.g., D’ ‘d’ ‘MM) messes up the sorting so I feel constrained to using this format for saving in the database.
However, on the generated web pages, I would like to echo the dates using a different format, e.g., 3 Jan (yes, without the year) instead of 20170103.
What I have now in the loop is: $date = get_field( 'event_date' ); followed by echo '<div>' . $date . '</div>';
I look at examples of strtotime in order to transform “$date” but am not sure how to craft it for my purpose and if at all it is the best approach to what I want to achieve.
I would be very greatful for some help with how to do this.