c# - DateTime to Date without TimeStamp -


var date = (from rec in dcbusinessaccountingcontext.workordersreportsp_result select rec.date);

here "var date" have dates

"dcbusinessaccountingcontext.workordersreportsp_result" time stamp, var date want

convert date without time stamp

ex: var date have "2013-05-20 11:52:51 am" want "2013-05-20"

how convert var date date

thanks prashanth

going on basis date datetime , not string

var dateonly = date.date; 

or if want date query

var date = rec in dcbusinessaccountingcontext.materialactivityreportsp_results            select rec.trx_date.date; 

Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -