Last active
January 12, 2018 19:36
-
-
Save tahafarooqui/656bf7efc9a81f104293a53ce743c617 to your computer and use it in GitHub Desktop.
PHP Unix Date Insert, Update
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Static | |
$checkIN = $this->input->post('checkIN'); | |
$checkIN = str_replace("/", "-", $checkIN); | |
$checkIN = date('Y-m-d h:i:s', strtotime($checkIN)); | |
$checkOUT = $this->input->post('checkOUT'); | |
$checkOUT = str_replace("/", "-", $checkOUT); | |
$checkOUT = date('Y-m-d h:i:s', strtotime($checkOUT)); | |
//Dynamic in for loop | |
$checkIN[$key] = $this->input->post('checkIN')[$key]; | |
$checkIN[$key] = str_replace("/", "-", $checkIN[$key]); | |
$checkIN[$key] = date('Y-m-d h:i:s', strtotime($checkIN[$key])); | |
$checkOUT[$key] = $this->input->post('checkOUT')[$key]; | |
$checkOUT[$key] = str_replace("/", "-", $checkOUT[$key]); | |
$checkOUT[$key] = date('Y-m-d h:i:s', strtotime($checkOUT[$key])); | |
//GET Date with Format | |
<?php echo date('d-m-Y',strtotime($singlelistva['passenger_checkout']));?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment