SSRS SECOND Function

The SSRS Second function is a Date and Time function that will extract the second of the minute from the given DateTime and return an integer from 0 to 59. The syntax of the Second function to extract the seconds from the Date and Time is as shown below.

=Second(Fields!OrderDate.Value)

To demonstrate the Second function, we use the Employee table below, which has 15 records. The image shows the records in the Table report.

Source Table

SSRS Second function Example

For this, let me add a new column to the right side of the Hire Date column and name it Seconds. Next, right-click the textbox under Second and choose Expression. To understand the report, I suggest you refer to the articles on SSRS charts and SSRS Dashboard reports from our SSRS tutorial page.

It opens the following expression window to print seconds. The Second function below extracts the Seconds value from the HireDate column and returns an integer value from 0 to 59 for each employee.

=Second(Fields!HireDate.Value)
Function return the Seconds of the minute from the date and time field

Please click the preview tab to see the report.

TIP: Please refer to the SSRS HOUR and SSRS MINUTE methods from the list of available SSRS Date and time functions.

SSRS Second Function to return the Seconds of the minute from the date and time field preview