By Guest on Wednesday, 09 December 2015
Replies 6
Likes 0
Views 1K
Votes 0
Hi Community,

I'm using the following custom string:

${startDate(%d. %b. %Y)}[!a:, ${startDate(%H:%M)}][m: - ${endDate(%d. %b. %Y)}]
${title}


With this I get a formatted date for Multi-Day-Events like "24. Jun. 2016 - 26. Jun. 2016"

Is it possible to get a formatted date like: "24. - 26. Juni 2016"

THX
Hello,

Yes use:


${startDate(%d.)}[!a:, ${startDate(%H:%M)}][m: - ${endDate(%d. %b. %Y)}]
${title}


Or if you only want it to apply to multiday you could use:


[!m: ${startDate(%d. %b. %Y)}][!a:, ${startDate(%H:%M)}][m: - ${startDate(%d. )} ${endDate(%d. %b. %Y)}]
${title}



Many thanks
Tony
·
Wednesday, 09 December 2015 19:26
·
0 Likes
·
0 Votes
·
0 Comments
·
[!m: ${startDate(%d. %b. %Y)}][!a:, ${startDate(%H:%M)}][m: - ${startDate(%d. )} ${endDate(%d. %b. %Y)}]
${title}


This code is almost what I wanted. One day Events are displayed perfect f.e. "10. Sep. 2016
Fohlenmarkt"


But multiday events are displayed in a wrong format: "- 24. 26. Jun. 2016
Großes Sommerturnier"
instead of "24. - 26. Jun. 2016
Großes Sommerturnier"


Is it possible to change the code to get that final format?


The other code

${startDate(%d. %b. %Y)}[!a:, ${startDate(%H:%M)}][m: - ${endDate(%d. %b. %Y)}]
${title}


displays mutiday event as wanted, but one day events are without month and year f.e. "16.
Fohlenschau"


THX
·
Thursday, 10 December 2015 07:27
·
0 Likes
·
0 Votes
·
0 Comments
·
Try
[!m: ${startDate(%d. %b. %Y)}][!a:, ${startDate(%H:%M)}][m: - ${startDate(%d - )} ${endDate(%d. %b. %Y)}]
${title}

·
Thursday, 10 December 2015 10:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Geraint!!!
It is working as wanted, just deleted a dash and added a dot.

[!m: ${startDate(%d. %b. %Y)}][!a:, ${startDate(%H:%M)}][m:  ${startDate(%d. - )} ${endDate(%d. %b. %Y)}]
${title}


I just have one final question. Can I change the short form of the month "Dez." into the full unshorted form "Dezember"?
·
Thursday, 10 December 2015 11:00
·
0 Likes
·
0 Votes
·
0 Comments
·
·
Thursday, 10 December 2015 11:09
·
0 Likes
·
0 Votes
·
0 Comments
·
Got it!

Thanaks for all your help!
·
Thursday, 10 December 2015 12:46
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post