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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -