需要帮助格式化 Oracle BI Publisher RTF 模板中的日期参数
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18663256/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
need help formatting a date parameter in Oracle BI Publisher RTF template
提问by end-user
I'm not talking about using the parameter in the data template - I'm all set there. I need to know how to change the format of a parameter once it hits my RTF template.
我不是在谈论使用数据模板中的参数 - 我都在那里设置。我需要知道如何在参数到达我的 RTF 模板后更改它的格式。
I have
我有
<?param@begin: p_Date?>
<? $p_Date?>
This gets my parameter from the report request page onto my report. However, I can't seem to alter the format. I'm sure I just need to understand how to access it, but I'm not that familiar with BI Publisher. I know I can alter the format on the request screen, and that flows through, but I need to alter it on the end result. Can anyone help?
这将我的参数从报告请求页面获取到我的报告中。但是,我似乎无法更改格式。我确定我只需要了解如何访问它,但我对 BI Publisher 不太熟悉。我知道我可以更改请求屏幕上的格式,并且可以通过,但我需要在最终结果上更改它。任何人都可以帮忙吗?
回答by end-user
Ok, I finally found it. You can use the format_datefunction; the documentation is a little sparse. My syntax looks like this:
好吧,我终于找到了。您可以使用format_date函数;文档有点少。我的语法如下所示:
<?xdoxslt:format_date($p_Date, 'MMM yyyy','MM-dd-yyyy', $_XDOLOCALE, $_XDOTIMEZONE)?>
The first parameter is the target format, the second is the input mask. The second can be overridden to use a specific l18n style.
第一个参数是目标格式,第二个参数是输入掩码。第二个可以被覆盖以使用特定的 l18n 样式。