Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all articles
Browse latest Browse all 3924

Convert string to timestamp in symfony 4

$
0
0

I have a variable recover from ajax and in the controller

dd($gethour);
"Sat Oct 26 2019 00:00:04 GMT+0200 (heure d’été d’Europe centrale)"
$from = \DateTime::createFromFormat('m-d-y H:i:s', $gethour);
dd($form);

Result:false

My problem is how to convert string to timestamp seen in the base HoursPass is a type timestamp


Viewing all articles
Browse latest Browse all 3924

Trending Articles



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