I inserted a value of DateTime into database, like "26.12.2009 11:50:00" .
Is it possible that the reader will read only the time of a day from this, without date?
So far I did only that it reads everything, date and time:
string myTime = Convert.ToDateTime(dataGridView1.Rows[IndexVrstica].Cells.Value).ToShortTimeString(); DateTime myTime2 = Convert.ToDateTime(myTime);
it has to be something like:
DateTime myTime2 = Convert.ToDateTime(myTime).ToShortTimeString();
but this is not ok, beucase I got an error, that it can not be transformed from date to string.
As I said, I would like that it reads only time. Is this possible?
If not, I will have to change some other thing, which I do not know how.
Edited 6 Years Ago by Mitja Bonca: n/a