Reputation: 1248
Not sure on how to format the timestamp value so it reads "February 15, 2013 12:34pm" right now it just reads "2013-03-15 12:04:11".
I have read a ton of post and none of them seem to help with my situation or show me a correct answer and how to implement it. Any help would be much appreciated.
Here is my view
<section class="noteinfo">
<p><span>Note:</span> <?php echo $row->folderName; ?></p>
<p><span>Created:</span> <?php echo $row->time; ?></p>
</section>
Here is my controller code
function create() {
if(array_key_exists('createFolder',$_POST)) {
$data = array(
'folderName' => $this->input->post('folderName')
// 'time' => date('Y-m-d H:i:s',now())
);
$data = str_replace(array(' ', '.', '?', '*', '%', '/'), '_', $data);
$datestring = "Year: %Y Month: %m Day: %d - %h:%i %a";
$time = time();
// $data = str_replace(' ', '_', $data);
$this->index_model->createFolder($data, $datestring, $time);
}
$this->foldercreated();
}
Here is my Model code
function createFolder($data) {
$this->db->where('time', 'time');
$this->db->where('folderName', 'folderName');
$this->db->insert('senior', $data);
return;
}
Upvotes: 0
Views: 46