I have this 21/10/1999
value manually inserted into the SQL database and when I retrieve it like this:
txtDOB.Text = readPatient["pDOB"].ToString();
It displays everything along with the time 12:00:00 AM
. My data type for my date column is date
, not datetime
. So why is it displays the time as well?
((DateTime)readPatient["pDOB"]).ToString("d");
For a list of supported formats see: http://msdn.microsoft.com/es-es/library/zdtaw1bw(v=vs.110).aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With