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?
['https://Stackoverflow.com/questions/38654071', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5713919/']
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())

```
I just found a better way if you want to base the day of the year on a parameter/field:

e.g. With a parameter called EndDate:

'Day of the year, of that parameter:

```
=DatePart("y",Parameters!EndDate.Value)

```