I am developing an app in VS2010 c# to fetch a single row data from SQLServer and insert it to MySQL.
I have a table with column name Date_Time containing date and time in 24 hrs. format as shown in below image.
Fetching code is as below.
SqlCommand cmd = new SqlCommand("SELECT TOP (1) s_name, s_city, s_address, s_added_date, s_added_by FROM tblAQI ORDER BY s_added_date DESC", SSCon);
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
s_name = (dr["s_name"].ToString());
s_city = (dr["s_city"].ToString());
s_address = (dr["s_address"].ToString());
s_added_date = (dr["s_added_date"].ToString());
s_added_by = (dr["s_added_by"].ToString());
}
when I print the value of s_added_date it gives me
My question is why it showing like this and how can I get this time in 24 hrs. format.
Please help to resolve it.
Thanks in advance.