Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1401
  • Last Modified:

How to show NULL datetime field in SSRS report?

How to show NULL datetime field in SSRS report? Please do suggest.
0
Easwaran Paramasivam
Asked:
Easwaran Paramasivam
  • 3
1 Solution
 
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:
=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
 
Easwaran ParamasivamAuthor Commented:
Accepting as solution for tracking purpose.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now