Search code examples
reporting-servicesssrs-2008reportbuilder3.0

Number of day of the year (INT) expression in SSRS


I'm making a report in ssrs where I want to get the Integer that specifies the number of day from the year it is today. Today =Now() will also be set as default as a Parameter (EndDate) so I'm actually looking for the number of the day of the year the EndDate parameter is. So for example 1st of January is 1, 1st of February is 32, 31st of December is 365. I tought there was this day of year expression in SSRS but it seems gone. Can anyone help me? Maybe with some sort of Dateadd or Datediff?


Solution

  • Try this expression

    function DateDiff in useful for date diffrence between two dates

    if we found day no from specific dates we can use as

    =DateDiff(DateInterval.Day,startdate,enddate)
    

    Example :

    =DateDiff(DateInterval.Day,CDate("1/1/2016"),now())