Good morning friends,
how to avoid time portion from the datetime variable ?
i dont want to use it by converting tostring() methord.
any other way to avoid the time portion. i am getting the value like 1/12/2015 12:00:00
i need the date only.
please help me to find out the solution
Thanks
Manish Kumar ChoudharyPosted Jan 23, 2015, 11:17 PM
shiju kvPosted Jan 23, 2015, 11:33 PM
Manish Kumar ChoudharyPosted Jan 23, 2015, 11:26 PM
Change date format in report viewer
=IIF(Year(Fields!DATE_SENT.Value)=1900,"-",Format(CDate(Fields!DATE_SENT.Value),"yyyy-MM-dd"))
Manish Kumar ChoudharyPosted Jan 23, 2015, 11:22 PM
Go through following link and modify your data in report viewer
http://stackoverflow.com/questions/9140630/how-to-remove-the-time-and-display-the-date-only-in-rdlc
shiju kvPosted Jan 23, 2015, 11:20 PM
shiju kvPosted Jan 23, 2015, 11:19 PM
Manish Kumar ChoudharyPosted Jan 23, 2015, 11:16 PM
show me your report query ?
shiju kvPosted Jan 23, 2015, 11:14 PM
when i open the show table data the time is not added with it .
but when i load to a report it shows
Manish Kumar ChoudharyPosted Jan 23, 2015, 11:11 PM
shiju kvPosted Jan 23, 2015, 11:09 PM
Manish Kumar ChoudharyPosted Jan 23, 2015, 11:05 PM
shiju kvPosted Jan 23, 2015, 11:03 PM
Manish Kumar ChoudharyPosted Jan 23, 2015, 11:02 PM
Use the Date property:
var dateAndTime = DateTime.Now;
var date = dateAndTime.Date;
Manish Kumar ChoudharyPosted Jan 23, 2015, 11:01 PM
If you are using sql server change data type to Date in place of DateTime it will give you only date.