How to remove the time and Display the Date only in RDLC
Asked Answered
M

5

14

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'

Metacarpus answered 4/2, 2012 at 11:50 Comment(2)
I think you can specify a cell format.Pallmall
@todda.speot.is Thanks. But how i specify?Metacarpus
W
28

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

Wafd answered 4/2, 2012 at 12:22 Comment(0)
C
2

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

Confident answered 4/9, 2017 at 8:57 Comment(1)
Can you elaborate on our answer and explain why yours is better than the ones already provided?Anselmi
C
0

This worked for me:

=FormatDateTime(Now(), DateFormat.ShortDate)
Cragsman answered 16/3, 2017 at 5:30 Comment(0)
U
0
=FormatDateTime(Fields!dtStamp.Value, DateFormat.ShortDate)

The image shows the working of dateFormat.

The image shows the working of dateFormat

Uganda answered 13/9, 2019 at 10:29 Comment(0)
S
-1

formate(Fields!date.Value,"dd/MM/yyyy")

Subterrane answered 14/2, 2013 at 7:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.