0

I want to insert date and time into my database "create_date_time" column please let me know how can I do that

Below is my table structure

CREATE TABLE colleague_rx_audit (
 rx_audit_id Integer NOT NULL,
 colleague_email varchar(255) NOT NULL,
 store_num Integer NOT NULL,
 role_name varchar(50) NOT NULL,
 action varchar(50) NOT NULL,
 create_date_time date NOT NULL
);

and I'm this code block for insertion :

$addressData['CUSTOMER_ID'] = $this->session->userdata('CUSTOMER_ID'); 
$addressData['BUILDING_NAME'] = $this->input->post('building_name'); 
$addressData['HOUSE_NUM'] = $this->input->post('house_num'); 
$addressData['CREATE_DATE_TIME'] = strtoupper(date("d-M-y h:i:s")); 
$addressData['LAST_UPDATE_DATE_TIME'] = strtoupper(date("d-M-y h:i:s")); 
$result = $this->db->insert('CUSTOMER_ADDRESSES',$addressData);
Barbaros Özhan
  • 59,113
  • 10
  • 31
  • 55
  • 1
    Can you include your current insert script? – Tim Biegeleisen Jul 17 '19 at 13:07
  • ``` $addressData['CUSTOMER_ID'] = $this->session->userdata('CUSTOMER_ID'); $addressData['BUILDING_NAME'] = $this->input->post('building_name'); $addressData['HOUSE_NUM'] = $this->input->post('house_num'); $addressData['CREATE_DATE_TIME'] = strtoupper(date("d-M-y h:i:s")); $addressData['LAST_UPDATE_DATE_TIME'] = strtoupper(date("d-M-y h:i:s")); $result = $this->db->insert('CUSTOMER_ADDRESSES',$addressData); ``` – Sushant kr. kunwar Jul 17 '19 at 13:25
  • Possible duplicate of [Oracle Joins - Comparison between conventional syntax VS ANSI Syntax](https://stackoverflow.com/questions/18891148/oracle-joins-comparison-between-conventional-syntax-vs-ansi-syntax) – AutoTester213 Jul 17 '19 at 14:17

0 Answers0