I am working on a blog and at the moment, on the homepage, I print out the post dates for each blog post through XSLT. However when I open up the blog post page. the date is printed using HTML like this:
I think you have to do somehing simlar to this: If you wan´t to do it in you templates. Then I coundn´t find how to print a specific field insted of the current date.
When you find the right answer, under the person who have give you the solution, to the problem, there is a green tick. I have made a screenshot from one of my posts to show you where to find the green tick. Then click on it.
How do I format a blog post Date
I am working on a blog and at the moment, on the homepage, I print out the post dates for each blog post through XSLT. However when I open up the blog post page. the date is printed using HTML like this:
which means the date is formatted as this: Wednesday, September 18, 2013.
How can I change the way the date is formatted while still using HTML?
Hi Alexandru,
I think you have to do somehing simlar to this: If you wan´t to do it in you templates. Then I coundn´t find how to print a specific field insted of the current date.
Other alternative you could do it in a XSLT file, an the place the macro for the XSLT file, where you have to print the date.
<xsl:value-of select="umbraco.library:FormatDateTime($currentPage/postDate, 'd MMMM, yyyy')"/>
The documentation for this can be found here:
http://our.umbraco.org/wiki/reference/umbracolibrary/formatdatetime
Hope this can help you to find a solution.
/Dennis
Hi agin efter som more searh I found something I think will work for you.
So try to see if this will solve your problem, or you could use the XSLT way, as I said i my first post.
/Dennis
Thanks! solved it using the 1st piece of code you gave me. However, this looks a tiny bit cleaner :)
Okay I´m glad that I could help you.
I think you should remember to mark this post as solved, so others with the same problem, can see what´s worked for you.
If you don´t know how do mark a post as resoved, then I can guide you through it
/Dennis
Honestly, I have no idea. Let me know how and I will do it :). Thanks again
Hi Alexandru,
When you find the right answer, under the person who have give you the solution, to the problem, there is a green tick. I have made a screenshot from one of my posts to show you where to find the green tick. Then click on it.
/Dennis
is working on a reply...