Regarding how to pass parameter of type datetime

Stimulsoft Reports.WEB discussion
Post Reply
maa
Posts: 1
Joined: Wed Feb 23, 2011 1:52 am

Regarding how to pass parameter of type datetime

Post by maa »

Hi

I want to pass parameter of type datetime to .mrt file.

I am using this query inside .mrt file

SELECT *
FROM TableName WHERE column = {Variable1}

0r


SELECT *
FROM TableName WHERE column between {Variable1} and {Variable2}

I am using this code in c# to initialize varables

DateTime dTime1 = new DateTime(2010, 01, 01);

report.compile();

//report.Dictionary.Variables["Variable1"].ValueObject = dTime1;

report["Variable1"] = dTime1;


The above method is working fine when I pass parameter of type string.

Please help me,this is very important aspect for us to continue using stimulsoft.

Thanks in advance.

Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Regarding how to pass parameter of type datetime

Post by Alex K. »

Hello,

When you use the DateTime type in the query with the Between construction, the date should be in the 'YYYYMMDD' format. Otherwise, you need to write a converter that will convert the date to your desired format.

Thank you.
Post Reply