开发者

problem with passing datetime to reporting service from asp.net

开发者 https://www.devze.com 2023-03-06 13:27 出处:网络
i\'m us开发者_如何学JAVAing SSRS2008 and asp.net on VS2008 SP1. i have found a problem when i tried to pass parameter from asp.net to reporting service.

i'm us开发者_如何学JAVAing SSRS2008 and asp.net on VS2008 SP1.

i have found a problem when i tried to pass parameter from asp.net to reporting service.

in my c# code, i added report parameter with date value of "05/01/2011" ( 1 May 2011 ) but it became "5 Jan 2011" in rdl file instead.

is it possible that this problem might come from different regional/system locale setting in server? because i did not found this problem on my development computer which was set to US location.

Please give me any suggestion on this issue.

Thanks in adv.

vcha


It looks like you are passing the date as a string? In that case I have had most success bypassing date format internationalisation problems by using a military style date format of "YYYY-MM-DD". In your example, your date would be "2011-05-01". Reporting Services always decodes this date format correctly.

0

精彩评论

暂无评论...
验证码 换一张
取 消