Issue:
Date not getting displayed in the webpage.
2)Click on Settings.
3)The following options appear.
Date not getting displayed in the webpage.
Solution:
1)Go to Blogger->Blogger Design.
2)Click on Settings.
3)The following options appear.
4)Click on Timestamp format.
5)Select format: Tuesday, October 06, 2016.
5)Click 'Save'.
6)Go to Template.
7)The below code must be in the template for the time to be displayed in the website.
<script type='text/javascript'>
var timestamp = "<data:post.timestamp/>";
if (timestamp != '') {
var timesplit = timestamp.split(",");
var date_yyyy = timesplit[2];
var timesplit = timesplit[1].split(" ");
var date_dd = timesplit[2];
var date_mmm = timesplit[1].substring(0, 3);
}
</script>
8)Click 'Save Template'.
9)Click 'View Blog' to view the page.
10)Date will get displayed!
2 Comments
Hi, I'm just starting to build my blog. I followed your steps given above but it didn't work for me. The 'undefined' vanished, so as the whole date. Any other ways to show the date? Thanks
ReplyDeleteHi Mimi, Thanks for commenting. Congratulations on starting your blog. Please recheck the code. Check if any semicolon or brackets are missing because this code solves the problem of undefined date in such an easy way :)
DeleteTell me how you felt about this :):)