Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-05-2014, 07:03 AM
Sunny24601 Sunny24601 is offline change date format in APA bibliography style Windows 8 change date format in APA bibliography style Office 2013
Novice
change date format in APA bibliography style
 
Join Date: Dec 2014
Posts: 1
Sunny24601 is on a distinguished road
Default change date format in APA bibliography style

Hi there,



I am writing my thesis and my professor wants me to use the APA style. Here I have the problem, that it shows dates like this "DD. MM YYYY" However, I want it to be "DD.MM.YYYY".

Somehow it not only uses spaces in general, there is this single dot after the date. why?

I have looked through the xml file but just cant find the exact problem. In the Harvard xml, it was easy because i just needed to change "spaces" to "dot"-tempates. Here, however, they seem to use a recursive style and I have no clue, where I need to make changes.

I would very grateful if anyone could help me!



Here is the original code from the part, where i believe the "spaces" and "dots" are put.

the parameters are:
format: which is either MY or DMY (depending if date is put or not)
day, month and year: are the data of souce,
withDot is initially not set (at least I cant find it anywhere)




<xsl:template name="StringFormatDate">
<xsl:param name="format" />

<xsl:param name="day"/>
<xsl:param name="month"/>
<xsl:param name="year"/>

<xsl:param name="withDot" />

<xsl:variable name="prop_EndChars">
<xsl:call-template name="templ_prop_EndChars"/>
</xsl:variable>

<xsl:choose>
<xsl:when test="$format = ''"></xsl:when>
<xsl:when test="substring($format, 1, 2) = '%%'">
<xsl:text>%</xsl:text>
<xsl:call-template name="StringFormatDate">
<xsl:with-param name="format" select="substring($format, 3)" />
<xsl:with-param name="day" select="$day"/>
<xsl:with-param name="month" select="$month"/>
<xsl:with-param name="year" select="$year"/>
<xsl:with-param name="withDot" select="$withDot" />
</xsl:call-template>
<xsl:if test="string-length($format)=2 and withDot = 'yes' and not(contains($prop_EndChars, '%'))">
<xsl:call-template name="templ_prop_Dot"/>
</xsl:if>
</xsl:when>
<xsl:when test="substring($format, 1, 1) = '%'">
<xsl:variable name="what" select="substring($format, 2, 1)" />
<xsl:choose>
<xsl:when test="$what = 'D'">
<xsl:value-of select="$day"/>
</xsl:when>
<xsl:when test="$what = 'M'">
<xsl:value-of select="$month"/>
</xsl:when>
<xsl:when test="$what = 'Y'">
<xsl:value-of select="$year"/>
</xsl:when>
</xsl:choose>
<xsl:call-template name="StringFormatDate">
<xsl:with-param name="format" select="substring($format, 3)" />
<xsl:with-param name="day" select="$day"/>
<xsl:with-param name="month" select="$month"/>
<xsl:with-param name="year" select="$year"/>
<xsl:with-param name="withDot" select="$withDot" />
</xsl:call-template>
<xsl:if test="string-length($format)=2 and withDot='yes'">
<xsl:variable name="temp2">
<xsl:call-template name="handleSpaces">
<xsl:with-param name="field">
<xsl:call-template name="formatNameOneItem">
<xsl:with-param name="format" select="$what"/>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="lastChar">
<xsl:value-of select="substring($temp2, string-length($temp2))"/>
</xsl:variable>
<xsl:if test="not(contains($prop_EndChars, $lastChar))">
<xsl:call-template name="templ_prop_Dot"/>
</xsl:if>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring($format, 1, 1)" />
<xsl:call-template name="StringFormatDate">
<xsl:with-param name="format" select="substring($format, 2)" />
<xsl:with-param name="day" select="$day"/>
<xsl:with-param name="month" select="$month"/>
<xsl:with-param name="year" select="$year"/>
<xsl:with-param name="withDot" select="$withDot" />
</xsl:call-template>
<xsl:if test="string-length($format)=1">
<xsl:if test="withDot = 'yes' and not(contains($prop_EndChars, $format))">
<xsl:call-template name="templ_prop_Dot"/>
</xsl:if>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

Last edited by Sunny24601; 12-05-2014 at 07:07 AM. Reason: trying to delete the automatically created smileys in code
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Letter date changes when merging with Excel - not the format, the actual date! Smallweed Mail Merge 1 02-07-2014 06:00 PM
change date format in APA bibliography style Change Mail Merge Date Format from US to UK Evanaught Mail Merge 1 09-29-2013 08:02 PM
change date format in APA bibliography style How to globally change the formatting of a bullet style to another style? ravl13 Word 5 03-10-2013 05:04 PM
change date format in APA bibliography style changing date format in Bibliography field elly111sk Word 3 07-25-2012 06:54 PM
Change format of date when using Now function in VB code Bondai Excel Programming 2 03-02-2012 05:09 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:55 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft