Select date from sql specified format?
- string date = "";
- using (SqlConnection openCon = new SqlConnection(cs))
- {
- SqlDataReader reader;
- SqlCommand cmd = new SqlCommand();
- cmd.CommandText = "select datum from mp_racun_lista where id=" + id_fakture;
- cmd.Connection = openCon10;
- openCon.Open();
- reader = cmd.ExecuteReader();
- while (reader.Read())
- {
- date = reader[0].ToString();
- }
- openCon.Close();
- }

Jayakumar BalasubramaniamRank #267 · 9.5K reputationPosted Jun 5, 2018, 3:29 PM EDT
Bryian TanRank #396 · 6.3K reputationPosted Jun 5, 2018, 5:42 PM EDT
Bhairab DuttRank #799 · 2.9K reputationPosted Jun 5, 2018, 7:34 PM EDT
Goran BibicRank #993 · 2K reputationPosted Jun 5, 2018, 7:33 PM EDT
Bryian Tan
Error CS1501 No overload for method 'ToString' takes 1 arguments BSS C:\Users\Bibic Goran\Documents\Visual Studio 2015\Projects\BSS\BSS\mp_racun.cs 1499 Active