title: Pass getdate() in dynamic query as parameter
body: <p>Good morning everyone! I am building a dynamical query with parameters as seen in code below.</p>
  
  <pre><code>     c.Open();
                  string columns = "(";
                  string values = "(";
                  foreach (DataGridViewColumn column in rootDataView.Columns)
                  {
                      if (virtualColumns.Contains(column.Name))
                      {
                      }
                      else
                      {
                          columns += column.Name + ",";
                          values += "@" + column.Name + " ,";
                      }
                  }
                  columns = columns.Substring(0, columns.Length - 1) + ")";
                  values = values.Substring(0, values.Length - 1) + ")";
                  SqlCommand command = new SqlCommand("insert into " + tableName + " " + columns + " Values " + values, c);
                  foreach (DataGridViewColumn column in rootDataView.Columns)
                  {
                      if (virtualColumns.Contains(column.Name))
                      {
                      }
                      else
                      {
                          if (column.Name != "timeFrom")
                          {
                              command.Parameters.AddWithValue("@" + column.Name, editedRow.Cells[column.Name].Value);
                          }
                          else
                          {
                              command.Parameters.AddWithValue("@" + column.Name, System.DateTime.Now);
                          }
                      }
                  }
                  command.ExecuteNonQuery();
  </code></pre>
  
  <p>But I have encountered a problem on this line </p>
  
  <pre><code>command.Parameters.AddWithValue("@" + column.Name, System.DateTime.Now);
  </code></pre>
  
  <p>I need to synchronize this time with SQL server, so I need to somehow pass <code>GETDATE()</code> as parameter, but when I enter it like this</p>
  
  <pre><code>command.Parameters.AddWithValue("@" + column.Name, "GetDate()");
  </code></pre>
  
  <p>it is being sent as string/varchar so it does not call function.</p>
  
  <p><strong>I would like to know if there is a way to pass function as parameter, or if I need to replace the <code>@timeFrom</code> part of query string.</strong></p>
  
  <p>EDIT:Please note the bold part, that is the question - I am asking for Yes/No and explanation why</p>