Home > Mobile >  Is there a way I can get actual date?
Is there a way I can get actual date?

Time:04-23

I have a variable that outputs the date in the following format: Thursday, 01-Jan-70
I am using this to retrieve the date but it is getting the wrong date according to the date I select I want to get actual date
I am trying to Post date in my input field...

$dateValue = isset($_POST['dateSend']); 
$day = date('D, d-M-y', strtotime($dateValue));

Any idea of how I can do it?

CodePudding user response:

Try this and share your feedback plz

if(isset($_POST['dateSend'])){
    $dateValue = $_POST['dateSend']; 
    $day = date('l, d-M-y', strtotime($dateValue ));
}
  •  Tags:  
  • php
  • Related