I don't fully understand how XF2 comes up with the date number. How would I convert a field formatted as YYYY-MM-DD to the XF2 format?
How would I convert a field formatted as YYYY-MM-DD to the XF2 format?
<?php
$string = '20171021';
$dateline = strtotime($string);
echo $dateline;
Here you go:
PHP:<?php $string = '20171021'; $dateline = strtotime($string); echo $dateline;
This website is really handy to convert unix timestamp to human readable date and vice versa.
https://www.epochconverter.com/
update table
set field = UNIX_TIMESTAMP(field)
We use essential cookies to make this site work, and optional cookies to enhance your experience.