现在xslt中声明<xsl:stylesheet version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:ms="urn:schemas-microsoft-com:xslt"
xmlns:SharePoint="Microsoft.Sharepoint.WebControls">
示例日期格式如:2009-01-20 12:38:41
<xsl:value-of select="ms:format-date(substring-before(Created,' '), 'dddd, MMMM, yyyy.')"/>
属性:http://msdn.microsoft.com/en-us/library/ms256099.aspx
结果:Tuesday, January, 2009.
<xsl:value-of select="ms:format-time(substring-after(Created,' '), ' hh:mm tt')"/>
属性:http://msdn.microsoft.com/en-us/library/ms256467.aspx
结果:12:38 PM
转载于:https://www.cnblogs.com/geek007/archive/2009/02/05/1384832.html
最后
以上就是知性白昼最近收集整理的关于xslt格式化日期和时间:使用ms:format-date、ms:format-time的全部内容,更多相关xslt格式化日期和时间:使用ms内容请搜索靠谱客的其他文章。
发表评论 取消回复