c# - I am using Entity Framework I want to Add date and time i am getting date from front end and than just concatenation with time -
i using entity framework want add date , time. getting date front end , concatenation time
datetime dt = dtstring//31/mar/2015
then add
time tm = '12:00:00:000'
and after insert data in sql
'2015-03-31 12:00:00:000', '2015-03-31 11:59:59:000'
string 1 = "31/mar/2015"; string 2 = "12:00:00:000"; datetime dt1 = datetime.parseexact(one + " " + two, "dd/mmm/yyyy h:mm:ss:fff", cultureinfo.invariantculture); console.writeline(dt1.tostring("yyyy-mm-dd h:mm:ss:fff"));
Comments
Post a Comment