Solved

How to show NULL datetime field in SSRS report?

Posted on 2014-01-21
4
1,232 Views
Last Modified: 2014-01-26
How to show NULL datetime field in SSRS report? Please do suggest.
0
Comment
Question by:Easwaran Paramasivam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 19

Expert Comment

by:Amandeep Singh Bhullar
ID: 39796577
Option i can suggest is send the empty result from SQL query using isNull.
0
 
LVL 16

Author Comment

by:Easwaran Paramasivam
ID: 39796683
=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
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 0 total points
ID: 39796968
=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
 
LVL 16

Author Closing Comment

by:Easwaran Paramasivam
ID: 39809811
Accepting as solution for tracking purpose.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question