Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $dataMy= date('Ymd',time());
- $dlv='20190107170000';
- $dlv=substr($dlv,0,8);
- $a = \DateTime::createFromFormat('Ymd', $dataMy );
- $b = \DateTime::createFromFormat('Ymd',$dlv);
- $interval = $a->diff($b);
- echo $interval->days;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement