WebSite X5Help Center

 
Robert A.
Robert A.
User

The [DATE] tag has stopped working on 13/12/2019  en

Author: Robert A.
Visited 461, Followers 2, Shared 0  

Hello,

On my page: http://www.ex-l-ence.com/ - I use the [DATE] tag in a text object "Our bestselling title for the 30 days to [DATE] is ......... "  - Why has it stopped working on the 13th - Superstitious? It was Friday the 13th :)

Thanks,

Robert.

Posted on the
12 ANSWERS - 1 CORRECT
Robert A.
Robert A.
User
Author

Hmmmm - I just uploaded the site again - and now it's updated???

Read more
Posted on the from Robert A.
Aleksej H.
Aleksej H.
Moderator
Best User of the month RU

Hello.Please specify your problem has already been resolved?

Read more
Posted on the from Aleksej H.
Robert A.
Robert A.
User
Author

Hi Aleksej,

Sadly no it's not fixed - now it's stuck on the 20th ???

Read more
Posted on the from Robert A.
Aleksej H.
Aleksej H.
Moderator
Best User of the month RU

Show how exactly the object with this tag looks.

It seems that it is intended only to indicate the current date at the time of adding.

Read more
Posted on the from Aleksej H.
Robert A.
Robert A.
User
Author

Hi Aleksej,

That's very odd as it WAS working for quite some time - I wondered if an upgrade to the software had changed it's behaviour?

Read more
Posted on the from Robert A.
Robert A.
Robert A.
User
Author

The way I am using it is: On my page: http://www.ex-l-ence.com/ - I use the [DATE] tag in a text object "Our bestselling title for the 30 days to [DATE] is xxxxxx "  - the xxxxxx is where I have to manually alter text if the bestselling book changes (which has not happened in over 3 months).

Read more
Posted on the from Robert A.
Aleksej H.
Aleksej H.
Moderator
Best User of the month RU

I meant send a screenshot of the program window, where I can see the tag itself.

"I wondered if an upgrade to the software had changed it's behaviour?" - may be.Maybe something has changed on the hosting.

Read more
Posted on the from Aleksej H.
Robert A.
Robert A.
User
Author

Hello Aleksej,

Sorry for the delay in replying - away for Christmas & New Year - by the way - Happy 2020 to you.

Screen captures attached...

Read more
Posted on the from Robert A.
Aleksej H.
Aleksej H.
Moderator
Best User of the month RU

"Happy 2020 to you" - And you too! wink

Regarding your question.Everything seems to work right.The current date at the time the site is uploaded is inserted on the page.This tag will not help you to display the current date (without the daily unloading site).

Read more
Posted on the from Aleksej H.
John S.
John S.
User

Hello Robert

To show the actual date you could use this :

---------------------------------------------------------

<p style="margin: 0; display: inline;">Our bestselling title for the 30 days to</p>
<p style="margin: 0; display: inline;" id="date"></p>


<script>
n = new Date();
y = n.getFullYear();
m = n.getMonth() + 1;
d = n.getDate();
document.getElementById("date").innerHTML = m + "/" + d + "/" + y;
</script>

------------------------------------------------------------------

You can style the date format as you wish.

The example will ( for today/postdate) give this :

Our bestselling title for the 30 days to 1/3/2020

The code between the ---- should be put in a HTML-object.

Hope it was something like this you are looking for.

Read more
Posted on the from John S.
John S.
John S.
User

Example where the title is styled with a bigger font. You can also change colors and so - but be aware that it could look messy if too much styling is used.

<p style="margin: 0; display: inline;">Our bestselling title for the 30 days to</p>
<p style="margin: 0; display: inline;" id="date"></p>
<p style="margin: 0; font-size:300%; display: inline;">The BESTSELLER</p>


<script>
n = new Date();
y = n.getFullYear();
m = n.getMonth() + 1;
d = n.getDate();
document.getElementById("date").innerHTML = m + "/" + d + "/" + y;
</script>

Read more
Posted on the from John S.
Robert A.
Robert A.
User
Author

Hello John,

Many thanks - your code gave me the answer, although I decided to simplify what I was showing on my site to last month's bestselling title and used:

<p style="margin: 0; display: inline;"><h5>Our bestselling title for last month</p>
<p style="margin: 0; display: inline;" id="date"></p><br>
<p style="margin: 0; display: inline;"><a href="http://www.ex-l-ence.com/miracles-on-the-camino.html">Miracles On The Camino</a></h5></p>

<script>

n = new Date();
var months = ["December","January", "February", "March", "April", "May", "June", "July", "August", "September", "October", ];

m = n.getMonth() + 1;

document.getElementById("date").innerHTML = months[n.getMonth()];
</script>

I left in some redundant code in case I want to play with the output some more :)

Have a great 2020 :) 

Read more
Posted on the from Robert A.