0
votes

IN SSRS I am trying to get first day of year when i select only year in parameter. I know how to make it in SQL. e.g. when i select 2020 in paramater i must get 01.01.2020 as output when i select 2019 in paramater i must get 01.01.2019 as output

i tried to get by DateAdd("d",-DatePart(DateInterval.DayOfYear,Today,0,0)+1,Today) here i get 1st day of year, but i am not getting where should i replace with my year parameter Can someone please help me.

Thank you in advance

1

1 Answers

1
votes

Assuming your year parameter is just a simple integer then you can just do.

=DateSerial(Parameters!myYearParam.Value, 1, 1)