SharePoint date label shown wrong
-
2012年4月6日 8:16
Hello,
I've made a custom view in which I have a date. However de date is shown ad <xsl-value-of node-walk="118" select="@Startdatum">2012-04-04T22:00:00Z in stead of 2012-04-04. How can I change this?</xsl-value-of>
<xsl-value-of node-walk="118" select="@Startdatum">I've tried this code:</xsl-value-of>
<xsl:value-of select="@Startdatum" />
and this code
<asp:label runat="server" id="ff7{$Pos}" text="{@Startdatum}" __designer:bind="{ddwrt:DataBind('u',concat('ff7',$Pos),'Text','TextChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Startdatum')}" />
Both do not work.
Any ideas?
Remco
<xsl-value-of node-walk="118" select="@Startdatum"></xsl-value-of>
すべての返信
-
2012年4月6日 11:44
I hove this link will solve your problem:
http://blogs.msdn.com/b/joshuag/archive/2009/03/25/custom-date-formats-in-sharepoint-xsl.aspx
An other option is to create a calculated field and put in the date there. Now you can control the format with a formula like :
=TEXT([Date];"yyyy-mm-dd");"") where ';' depends on your local setting. It can be ','.
-
2012年4月6日 12:35In the default list it's working but in my custom list it isn't, this forum doesn't work. If i apply this then the whole form isn't working anymore.
-
2012年4月6日 13:45
Hi,
Could you try and select that field and format it as "Date". It should work.
Cheers
-
2012年4月13日 12:24I would say so but then it's not working at all. It says its not the same format.
-
2012年4月16日 10:58
Change select="@Startdatum"
to select="msxsl:format-date(@Startdatum,'MM/dd/yyyy')"
like the following:
<xsl:value-of "msxsl:format-date(@Startdatum,'MM/dd/yyyy')"/>
- 編集済み Karl Sanford 2012年4月16日 11:05
- 回答としてマーク Remco Hooijer 2012年5月31日 14:11

