Pothi Sam

Pothi Sam

  • NA
  • 335
  • 50.2k

how to insert selected date in to date base in date format

Dec 5 2014 12:43 AM
query = "Air_travel_request_insert";
        SqlCommand com = new SqlCommand(query, con);
        com.CommandType = CommandType.StoredProcedure;
        
        com.Parameters.AddWithValue("@FromPlace1", txtfrom1.Text.ToString()); ;
        com.Parameters.AddWithValue("@ToPlace1", txtto1.Text.ToString()); ;
        com.Parameters.AddWithValue("@DateOfJourny1", txtjd1.Text.ToString()); ;
        com.Parameters.AddWithValue("@FlightNo1", txtflno1.Text.ToString()); ;
        com.Parameters.AddWithValue("@DepartureTime1", txtdep1.Text.ToString()); ;
 com.ExecuteNonQuery();




i need to insert @dateofjourny1 to date format in "yyyy-mm-dd",DateOfJourny1 pick from ajax

Answers (1)