title: How to make a mysql table with date and time columns?
body: <p>I am trying to create a table that has date and time columns used to store the date and time information when the entry is recorded in the database. In the MySQL documentation shows the following example:</p>
  
  <pre><code>CREATE TABLE t1 (
    ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    dt DATETIME DEFAULT CURRENT_TIMESTAMP
  );
  </code></pre>
  
  <p>The problem is that I want separate fields for date and time. On another site I found this piece of code that suits my needs for the date:</p>
  
  <pre><code>CREATE TABLE test (id INT, date_added DATE);
  </code></pre>
  
  <p>but I wasn't able to find anything like that for the time.
  Will the following piece of code make separate date and time fields that would be filled as the entry is recorded?</p>
  
  <pre><code>CREATE TABLE test (id INT, date_added DATE, time_added TIME);
  </code></pre>