Hi members,
Greetings of the day...
a time field in my Access db table, log in time is recorded as '10:30 AM' but when I fetch the record to a DGV, it shows as '30/12/1899 10:30 AM' !!!
I am surprising why the date is showing of the year 1899. the data type is date/time and format is Medium Date' the time data also being saved as mentioned above but the out put in DGV shows with date. I want it to be displayed as it is in the db.
I have found some functions that separates/extracts time from the date but the display remains the same.
DateTime dt = DateTime.Now;
string CONVdt = dsFetchAppo.Tables[0].Rows[0].ItemArray[3].ToString();
DateTime.TryParse(CONVdt, out dt);
string CONVtime = dt.ToString("H:mm tt");
string CONVdt = dsFetchAppo.Tables[0].Rows[0].ItemArray[3].ToString();
DateTime.TryParse(CONVdt, out dt);
string CONVtime = dt.ToString("H:mm tt");
please note that it's C# WinApp and database is MS Access.
Thank You
Mayank Jani
Amit GuptaPosted Apr 2, 2018, 1:48 PM
Mayank JaniPosted Apr 3, 2018, 7:48 AM
Mayank JaniPosted Apr 3, 2018, 7:46 AM
Rafnas T PPosted Apr 3, 2018, 2:15 AM
Mayank JaniPosted Apr 2, 2018, 1:20 PM
Mayank JaniPosted Apr 2, 2018, 1:20 PM
Mayank JaniPosted Apr 2, 2018, 12:52 PM
Amit GuptaPosted Apr 2, 2018, 11:06 AM
Mayank JaniPosted Apr 2, 2018, 8:57 AM
Mayank JaniPosted Apr 2, 2018, 8:54 AM
Amit GuptaPosted Mar 30, 2018, 9:41 AM
Rafnas T PPosted Mar 30, 2018, 8:02 AM
Mayank JaniPosted Mar 30, 2018, 7:47 AM
Amit GuptaPosted Mar 29, 2018, 12:34 PM