title: Insert current date time in a column of and keep it constant
body: <p>i am using sql server in making my project with javafx. Their i have a table of purchase and sale. One of the column of both of them is date having current date and time to store them as a record that this transaction has been saved in this time.
  Now i am using the that date column with varchar datatype and have using computed column specification with following function:</p>
  
  <pre><code>(CONVERT([varchar](25),getdate(),(120)))
  </code></pre>
  
  <p>but when i select records from that table using query</p>
  
  <pre><code>SELECT pr.Date, p.Name, pr.Quantity, s.Name, p.Pur_Price
  FROM (([Product] AS p
  INNER JOIN [Purchase] AS pr ON pr.Product_id=p.Product_id)
  INNER JOIN [Supplier] AS s ON s.Supplier_Id=p.Supplier_Id)
  WHERE pr.Date&gt;= dateadd(dd, 0, datediff(dd, 0, getdate()-30))
  </code></pre>
  
  <p>but it selects all the records keeping all date records to current date and time. Thanks in advance.
  Looking forward for your good replies.</p>