How to show NULL datetime field in SSRS report?

How to show NULL datetime field in SSRS report? Please do suggest.
LVL 16
Easwaran ParamasivamAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Easwaran ParamasivamConnect With a Mentor Author Commented:
=Convert.ToDateTime(IIF(IsNothing(Fields!LastPasswordDtm.Value),DateTime.MinValue,Fields!LastPasswordDtm.Value).ToString()).ToString().Replace(DateTime.MinValue.ToString(),string.Empty)

Open in new window


Above code solves the issue.
0
 
Amandeep Singh BhullarCommented:
Option i can suggest is send the empty result from SQL query using isNull.
0
 
Easwaran ParamasivamAuthor Commented:
=IIf(IsNothing(Fields!LastPasswordDtm.Value.DateTime),"",Fields!LastPasswordDtm.Value.DateTime)

Open in new window

I use above expression. It works fine for Non nullable columns but ERROR is shown for NULLABLE column. How to resolve it? Please do suggest.
0
 
Easwaran ParamasivamAuthor Commented:
Accepting as solution for tracking purpose.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.