Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81938

PHP Date validation.

$
0
0

Been searching a while but cannot work it out.

My dates are stored in a Msql table as 2017-12-11

So I need to show them in the tables as
11-12-2017 ( ie DD-MM-YYYY)

Also the editor using the date type: 'datetime'

Field::inst( 'start_date' )
            ->validator( 'Validate::dateFormat', array(
                "format"  => Format::DATE_ISO_8601,
                "message" => "Please enter a date in the format yyyy-mm-dd"
            ) )
            ->getFormatter( 'Format::date_sql_to_format', Format::DATE_ISO_8601 )
            ->setFormatter( 'Format::date_format_to_sql', Format::DATE_ISO_8601 )
    )

What is the correct syntax plaes.

Cheers

Steve Warby


Viewing all articles
Browse latest Browse all 81938

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>