Created
November 1, 2017 01:39
-
-
Save Bernix01/bdaae1604489f33ae9016f86fc56c486 to your computer and use it in GitHub Desktop.
CSV date re-formatter
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
<?php | |
$data = 'fecha'; | |
$arra = str_getcsv ( $data , "\n" ); | |
foreach($arra as &$Row) { | |
$Row = str_getcsv($Row, ","); | |
if($Row[20] != "" && $Row[20] != "fechalect"){ | |
$Row[20] = strftime("%Y-%m-%d %H:%M:%S",strtotime($Row[20])); | |
} | |
echo implode (",", $Row)."\n"; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment