Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/date/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Date 如何在ssrs中编写表达式将yyyymm转换为mm yyyy? 我有一个表,其中有一个YearMonth列(201302) 我创建了一个参数YearMonth_Date_Reporting Services_Format - Fatal编程技术网

Date 如何在ssrs中编写表达式将yyyymm转换为mm yyyy? 我有一个表,其中有一个YearMonth列(201302) 我创建了一个参数YearMonth

Date 如何在ssrs中编写表达式将yyyymm转换为mm yyyy? 我有一个表,其中有一个YearMonth列(201302) 我创建了一个参数YearMonth,date,reporting-services,format,Date,Reporting Services,Format,现在,我想在SSRS中写一个表达式,以便每次报告运行时,日期和月份都像这样2013年2月 你能告诉我为什么下面的表达不起作用吗 谢谢 =CStr(Right(MonthName(Month(Parameters!NLR_YearMonth.Value)),3)) + "-" + Left(Year(Parameters!NLR_YearMonth.Value),4) 试试这个: =Format(DateValue(MonthName(Right(Parameters!NLR_YearMo

现在,我想在SSRS中写一个表达式,以便每次报告运行时,日期和月份都像这样2013年2月

你能告诉我为什么下面的表达不起作用吗

谢谢

=CStr(Right(MonthName(Month(Parameters!NLR_YearMonth.Value)),3))
 + "-" + 
 Left(Year(Parameters!NLR_YearMonth.Value),4)
试试这个:

=Format(DateValue(MonthName(Right(Parameters!NLR_YearMonth.Value, 2))
 + "," + 
 Left(Parameters!NLR_YearMonth.Value,4)), "Y")
表达方式如下:

  • 剪断绳子以得到这个月
  • 将装载转换为
    MountName
  • 在月份和年份之间创建逗号分隔符
  • 剪断绳子以获得一年
  • 使用
    DateValue
    函数将返回字符串转换为
    Date
    对象
  • 格式化日期以满足您的需要
  • 结果应该是: 2013年2月