Created
October 10, 2017 12:39
-
-
Save axxe16/40e73a061ff23b8dda275848dccb0361 to your computer and use it in GitHub Desktop.
[conversione data] da usare se si parte da una data con questo format g/m/a e si vole ottenere il formato mysql #date #php #convert #toSQLformat
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 | |
//perchè funzioni strtotime è necessario sostituire / con - | |
$data = strtotime(str_replace('/', '-' ,$_POST['data_nascita_cliente']); | |
//ottengo il formato richiesto | |
$data_nascita_cliente = date('Y-m-d', $data)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment