How does the php string get between specific characters?

assume that there is a set of dates like this

2018-04-16T10:21:11.342Z

I want to catch

2018-04-16 10:21:11 

that"s fine. Don"t do anything else
what functions can I use to do it?

Mar.03,2021

powerful strtotime

$s = strtotime('2018-04-16T10:21:11.342Z');
echo date('Y-m-d H:i:s', $s);

date ('Y-m-d Havi iRanger swatches journal journal strtotime (' first date')

this is relatively simple.
you can also try regularization

Menu