Date Parameter set to a specific date

AK13247987412 20 Reputation points
2023-09-26T09:34:47.44+00:00

Hi Guys,

How do I set the date parameter to a default date from 25/09/2023?

I am using the below syntax but its producing an error.

="20230925"

Thanks,

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,910 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Olaf Helper 43,901 Reputation points
    2023-09-26T09:44:20.5866667+00:00

    but its producing an error.

    Of course, it's a text/string, not a date. Use the DateSerial fucntion to get a valid date.

    =DateSerial(2023, 9, 25)
    
    

    See https://learn.microsoft.com/en-us/sql/reporting-services/report-design/expression-examples-report-builder-and-ssrs?view=sql-server-ver16

    0 comments No comments

  2. AniyaTang-MSFT 12,441 Reputation points Microsoft Vendor
    2023-09-26T09:58:41.68+00:00

    Hi @AK13247987412

    You can also try using the CDate function to convert the value to a date.

    =CDate("09/25/2023")
    
    

    Best regards,

    Aniya

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.