A website about review of beauty products, cooking recipes, home remedies for various skin problems like acne and also other cool stuffs !!

Interested to Work and Earn with us? Visit 'Jobs' page
Custom Search

Blogger Problem: Undefined Date Issue

Issue:
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 = &quot;<data:post.timestamp/>&quot;;
if (timestamp != &#39;&#39;) {
  var timesplit = timestamp.split(&quot;,&quot;);
  var date_yyyy = timesplit[2];
  var timesplit = timesplit[1].split(&quot; &quot;);
  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!


Previous
Next Post »

2 comments

Click here for comments
July 2, 2016 at 11:34 PM ×

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

Reply
avatar
admin
July 3, 2016 at 6:32 PM ×

Hi 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 :)

Reply
avatar
admin

Tell me how you felt about this :):) Out Of Topic Show Konversi KodeHide Konversi Kode Show EmoticonHide Emoticon

Thanks for your comment