SSRS IsDate Function

The SSRS IsDate function is an Inspection function that checks whether the given field or expression represents a valid date. If it represents a valid date, it returns a boolean True; otherwise, it returns False. The syntax of the IsDate function to find whether the column value is an actual valid date is as shown below.

=IsDate(Fields!HireDate.Value)

To demonstrate the SSRS IsDate function in reporting services, we use the Employee table below, which has 20 records. The image shows the records in the Table report.

Inspection Source Table

SSRS IsDate function Example

For this, let me add a new column to the right side of the Birth Date column. Next, right-click the textbox under it and choose Expression to open the expression window shown below. The IsDate function expression below will check whether the values in the BirthDate column are valid dates. If they are, it will return a Boolean True; otherwise, it will return False.

  1. More Functions
  2. Charts
  3. Tables
  4. Format tables
  5. SSRS
=IsDate(Fields!BirthDate.Value)
SSRS IsDate Function expression to check the field is date or not

Although the above SSRS IsDate function expressions meet the requirement, showing any message or default date would be nice instead of True or False. So, let me create a new column and use the IIf function to return the Month Name for the valid date field; otherwise, return January. The IIf and IsDate function expressions to perform the same are shown below.

=IIf(ISDate(Fields!DateFirstPurchase.Value) = True,
MonthName(Month(Fields!DateFirstPurchase.Value)), "January")

Please click the preview tab to see the IsDate report.

SSRS IsDate Function to check the column value is date time or not report