SQL SSRS Report Builder 3.0 2012 上个月的最后一天

SQL SSRS Reportbuilder 3.0 2012 Last day of the month before the previous month

我需要获取前一个月的最后一天,在本例中是指 1 月 31 日。我尝试了以下表达式 =dateadd("m",-1,dateserial(year(Today),month(Today),0)) 但它会 return 1 月 29 日(因为我认为 2 月只有 29 天)。我怎样才能确保 1 月 31 日出现?谢谢你们。

经过反复试验,我终于在 Report Builder 中找到了正确答案。我使用了以下表达式:=DateSerial(Year(Today()),Month(DateAdd("m", -1, Today())),0)