我是靠谱客的博主 知性白昼,这篇文章主要介绍xslt格式化日期和时间:使用ms:format-date、ms:format-time,现在分享给大家,希望可以做个参考。

  现在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内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(46)

评论列表共有 0 条评论

立即
投稿
返回
顶部