2
Folks I’m developing an application that picks up the registration date from the register. But it’s picking up the date with American standard YYYY/mm/dd as I fix it in codeigniter ?
Follow example of my code.
minha página html
<div class="row clearfix">
<div class="col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label">
<label for="cadastro">Cadastro</label>
</div>
<div class="col-lg-8 col-md-10 col-sm-8 col-xs-7">
<div class="form-group">
<div class="form-line">
<input type="text" id="cadastro" name="cadastro" class="form-control" required>
</div>
</div>
</div>
</div>
My controller is like this
if($this->input->post('submit')){
$this->form_validation->set_rules('cadastro', 'Cadastro', 'trim|required');
if ($this->form_validation->run() == FALSE) {
$dados['view'] = 'admin/properties/properties_add';
$this->load->view('layout', $dados);
}
else{
$dados = array(
'cadastro' => date('Y-m-d : h:m:s'),
);
}