Assuming you are using SQL server (because you are using system.data.sqlclient), below is the correct syntax for update statement:
string sqlQuery = "Update p SET p.Date =@dt from Perioada p join Client c on p.ID_Client = c.ID_Client WHERE (c.CNP = @cnp)"
using (SqlConnection con = new SqlConnection(connectionString))
{
SqlCommand command = new SqlCommand(sqlQuery, con);
command.Parameters.AddWithValue("@dt", dateTimePicker1.Value.ToString("MM/dd/yyyy"));
command.Parameters.AddWithValue("@cnp", textBox1.Text);
try
{
con.Open();
command.ExecuteNonQuery();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
On a side note, you should use SqlParameter to pass input control's values to the sql server, instead of manually creating sql query with appended values. Your way of creating query is prone to SQL injection attack.
EDIT: Edited answer to depict a way to use parameterised query