Support

Account

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