Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove the time and Display the Date only in RDLC

Tags:

c#

winforms

rdlc

all I am using Winform(C#) and RDLC MySQL. In that I try to show the date only in Tablex.

But this date format have time also. How to remove the time.

My Expression is,..

=Fields!date.Value

See my report below.

enter image description here

Thanks in advance?

I am tried =Fields!date.Value.ToString("dd/MM/yyyy") in expression But It through error,.. Error 1 An error occurred while validating. HRESULT = '8000000A'

like image 572
Sagotharan Avatar asked Feb 04 '12 11:02

Sagotharan


2 Answers

You can use the FormatDateTime method:

=FormatDateTime(Fields!date.Value, DateFormat.ShortDate)

Or you can set the formatting in the properties window: enter image description here

like image 159
nemesv Avatar answered Oct 20 '22 08:10

nemesv


="Current Date:-"&Format(Now,"dd/MM/yyyy hh:mm tt") this is for current date and time

like image 1
Ajay Dagade Avatar answered Oct 20 '22 07:10

Ajay Dagade