I have a strange problem with ado.net data table. I have table named Test in database. It has following data
I used a data table to fetch this data. Following is my code:
using (SqlConnection cnn = new SqlConnection(strConString))
{
cnn.Open();
SqlDataAdapter da = new SqlDataAdapter("select top 100 idID,dtDate from Test order by idID desc", cnn);
DataTable dt = new DataTable();
da.Fill(dt);
//Inserted breakpoint and viewed dt in visualizer
da.Dispose();
}
When I see data in quick watch it displays data as shown in following image:
I am not understanding why data table converted a PM time to AM. I tried to display data in html table, just to figure out that it is not a bug in data visualizer or quick watch window. But it is showing time as '15 Nov 2018 10:20 AM' when format "dd MMM yyyy hh:mm tt" is applied.
Any help will be appreciated.