How to Change Date Format in .net RDLC Report?
Solution 1
Possibility 1:
I think the correct format string is "dd-MMM-yyyy"
(uppercase M, see MSDN)
And I would use Format(Fields!IssuingDate.Value,"dd-MMM-yyyy")
instead of ToString()
Possibility 2:
Just use Fields!IssuingDate.Value
as Expression of your TextBox and set the Format
property of the TextBox to dd-MMM-yyyy
Solution 2
Date formats can also be changed by right clicking the field in the RDLC report (whose format we want to change) and:
- choose "Text box properties"
- then choose the option "Number"
- then choose one of the multiple "Date" options, or specify a Custom formatting option
Solution 3
In the Expression
property, set the following format and it will work fine:
=Format(Cdate(Fields!InvoiceDate.Value),"yyyy/MM/dd")
Solution 4
Do not use any formatting function like Format(). Instead right click on the text box and select Text Box Properties... And then select Number from left column and set your desire format like in Excel.
You can many other properties like Alignment, Fill and Action.
Solution 5
This may be helpful
= CDate(Fields!Date.Value).ToString("dd-MMM.-yyyy" )
Related videos on Youtube
Comments
-
Stephen L almost 2 years
I need to set my date column as 01-Jan-2013, what is the format to acheieve this in rdlc?
I have given
=CDate(Fields!IssuingDate.Value).ToString("dd-mmm-yyyy")
its not working correctly. Any one post me the format for 02-Jul-2013.
-
Syed Nasir Abbas almost 6 yearsIn my case, I need to round to 2 decimals and it was rounding 175.89 to 175.9. I removed Round() and apply the format like mentioned above and get the desired result 175.90