How to change date format in .net RDLC report?

I need to set the date column as 01-Jan-2013 , what is the format for this in rdlc?

I gave

=CDate(Fields!IssuingDate.Value).ToString("dd-mmm-yyyy") 

not working properly. Any of them will write me a format for 02-Jul-2013 .

Thanks at Advance.

+12
rdlc
source share
8 answers

Use it, you will get your result

 =CDate(Fields!IssuingDate.Value).ToString("dd-MMM-yyyy") 
+23
source share

Option 1:

I think the correct format string is "dd-MMM-yyyy" (upper case M, see MSDN )

And I would use Format(Fields!IssuingDate.Value,"dd-MMM-yyyy") instead of ToString()

Opportunity 2:

Just use Fields!IssuingDate.Value as an expression of your TextBox and set the Format TextBox property to dd-MMM-yyyy

+14
source share

Date formats can also be changed by right-clicking the field in the RDLC report (the format of which we want to change) and:

  1. select Text Box Properties
  2. then select the option "Number"
  3. then select one of several Date options or specify a custom formatting option

enter image description here

+7
source share

Set the following format in the Expression property and it will work fine:

 =Format(Cdate(Fields!InvoiceDate.Value),"yyyy/MM/dd") 
+2
source share

Do not use a formatting function such as Format (). Instead, right-click the text box and select "Text Box Properties" ... Then select "Number" in the left column and specify the format of the desire, as in Excel.

You can use many other properties, such as alignment, fill, and action.

+1
source share
 CDate(Fields!IssuingDate.Value).ToString("dd-mmm-yyyy") 

Change it as follows, it will work definitely:

ToString should be ToString and mmm should be mmm , so you will have:

 CDate(Fields!IssuingDate.Value).ToString("dd-mmm-yyyy") 
0
source share

This also works (and does not work when DateValue.Value is null):

 =String.Format("{0:dd-MMM-yyyy}", Fields!DateValue.Value) 
0
source share

You can edit your rdlc as XML and just use Now (), just like DateTime.Now and Format.

 <Value>="Date: " &amp; Format(Now(), "dd/MM/yyyy HH:mm")</Value> 

The result in the file "Date: 08/22/2019 10:20"

0
source share

All Articles