# Help with guestbook code - date & time

**URL:** <https://forum.kirupa.com/t/help-with-guestbook-code-date-time/66635>\
**Category:** Uncategorized\
**Created:** [October 7, 2004, 3:08pm UTC](https://forum.kirupa.com/t/help-with-guestbook-code-date-time/66635 "2004-10-07T15:08:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![spectreman](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@spectreman](https://forum.kirupa.com/u/spectreman)\
**Post date:** [October 7, 2004, 3:08pm UTC](https://forum.kirupa.com/t/help-with-guestbook-code-date-time/66635/1 "2004-10-07T15:08:12Z")

</div>

hello everyone,

i’m trying to get this guestbook all set up, but i want to add the date and time of when the message was written after the users message…can someone help me with the code that will acomplish this? what do i need to add to the following:

for (i=(firstItem-1); i\>= lastItem; i–){  
myGuestbook.htmlText += “\<B\>” + this.firstChild.childNodes\*.attributes.myName + "\</B\> wrote:  
";  
myGuestbook.htmlText += this.firstChild.childNodes\*.firstChild.firstChild.nodeValue + "

";  
//i want the date & time to show up here…

thanks,  
s.
