WebSite X5Help Center

 
Cuong N.
Cuong N.
User

Automatic addition of date to post  en

Автор: Cuong N.
Просмотрено 269, Подписчики 2, Размещенный 0  

Hi all,

Please advise how I can set the date to be automatically added to the post? Many thanks

Cuong

Размещено
10 Ответы - 1 Полезно
Aleksej H.
Aleksej H.
Moderator

Hello. The date is automatically added to the blog post.

Читать больше
Размещено От Aleksej H.
Cuong N.
Cuong N.
User
Автор
Aleksej H.
Hello. The date is automatically added to the blog post.

Is there a way for adding date to page automatically?

Читать больше
Размещено От Cuong N.
Incomedia
Elisa B.
Incomedia

Hi Cuong, 

I fear you would need to use extra code for this function, I am sorry about this. 

Thanks! Kind regards.

Читать больше
Размещено От Elisa B.
Axel  
Axel  
User

Hello Cuong,

You can add this code into an HTML object on your page

<script>
document.getElementById("Aujourdhui").valueAsDate = new Date();
</script>

and the display will be !

Axel

Читать больше
Размещено От Axel  
Cuong N.
Cuong N.
User
Автор

Many thanks Axel for your suppport. I did, but I dont see the date appear. I changed the page from html to php and vice versa but it didnt work.

Cuong

Читать больше
Размещено От Cuong N.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Лучший пользователь месяца FRЛучший пользователь месяца PL

... which date...?...
... today's...!?...
... or the modification date...!?...

.

Читать больше
Размещено От  ‪ KolAsim ‪ ‪
Cuong N.
Cuong N.
User
Автор
 ‪ KolAsim ‪ ‪
... which date...?... ... today's...!?... ... or the modification date...!?... .

Hi KolAsim, the best is the today's date, but the date can be modified (as I understood your modification date) is also ok.

Thank you in advance.

Cuong

Читать больше
Размещено От Cuong N.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Лучший пользователь месяца FRЛучший пользователь месяца PL
Cuong N.
... ... ... Hi KolAsim, the best is the today's date, ... ... ... 

... OK ... paste this code into an HTML Code Object, or into an HTML-enabled Text Object [</>]:

<p id="dateK"> K </p>
<script>
dateK = new Date();
yearK = dateK.getFullYear();
monthK = dateK.getMonth() + 1;
dayK = dateK.getDate();
document.getElementById("dateK").innerHTML = "Welcome, today is the day " + monthK + "/" + dayK + "/" + yearK;
</script>

.

ciao

.

Читать больше
Размещено От  ‪ KolAsim ‪ ‪
Cuong N.
Cuong N.
User
Автор

Thank you very much, KolAsim.

Читать больше
Размещено От Cuong N.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Лучший пользователь месяца FRЛучший пользователь месяца PL

wink

Читать больше
Размещено От  ‪ KolAsim ‪ ‪