c# - Time still show up in date datatype -


i have column in sql server 2008 r2 database table datatype of date not datetime. still in crystal report appears this:

 8/4/2013  12:00:00am  8/2/2013  12:00:00am  8/1/2013  12:00:00am 

12:00:00am must not included because datatype date not datetime right? why still shows in report? how remove that?

that because few exceptions1, sql server date/time datatypes mapped datetime. if don't want see time component, specify appropriate format string desired display format. instance,

string today = new datetime(2013,8,1).tostring("d mmm yyyy") ; 

will give value of 1 aug 2013 (in english language culture).

1 time data type mapped timespan, , datetimeoffset mapped to...wait it...datetimeoffset.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -