Home › Forums › Front-end Issues › Manipulating datepicker data › Reply To: Manipulating datepicker data
Elliott
How often does this happen…
Solution found
<?php
$date = get_field('course_date');
// $date = WED2013NOV6 (23/11/1988)
// extract Y,M,D
$D = substr($date, 0, 3);
$y = substr($date, 3, 4);
$m = substr($date, 7, 3);
$d = substr($date, 10, 2);
// create UNIX
$time = strtotime("{$d}-{$m}-{$y}");
// format date (23/11/1988)
?>
<div class="calendar">
<p class="calendarDate"><span class="dow"><?php echo $D; ?></span>
<span class="day"><?php echo $d; ?> <br /><?php echo $m; ?></span>
<span class="year"><?php echo $y; ?></span>
</p>
</div>
Outputs as I wish and all hunky-dory… just a final one… with the date format now saved as WED2013NOV6 … can I wort the courses into a dater ordered list? Or are you going to tell me to read the docs 🙂
Pete
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.