Skip to main content

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!


Comments

  1. 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

    ReplyDelete
    Replies
    1. 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 :)

      Delete

Post a Comment

Tell me how you felt about this :):)

Popular posts from this blog

Review of Acnestar Soap

Hi everyone, Today I will be giving review of Acnestar soap . PC: www.allaboutbeautyandhealth.com What is so special about this soap? Can everyone use it? Who should actually use this soap? I will answer these questions one by one. I use Benzac (Benzyl Peroxide, 2.5%) when I get pimples during my special days. It is a gel that eliminates pimples in the same night. It basically dries out the zits so pimple gets cleared by next day! I wash my face with a mild soap, wait for about 15 to 20 minutes until skin dries up completely. I apply this cream on the affected spots. In the beginning I used to get slight tingling sensation. My skin had to get used to it. On the first time use, I kept it for 20 minutes and washed it. I did not actually experience any heating sensation as such but I just washed it to be on safer side. From second night I let it work on my face the whole night. It dries up your zits so damn wonderfully and your face appears fair. Its also a bleaching...

Review of Acnestar Soap

Hi everyone, Today I will be giving review of Acnestar soap . PC: www.allaboutbeautyandhealth.com What is so special about this soap? Can everyone use it? Who should actually use this soap? I will answer these questions one by one. I use Benzac (Benzyl Peroxide, 2.5%) when I get pimples during my special days. It is a gel that eliminates pimples in the same night. It basically dries out the zits so pimple gets cleared by next day! I wash my face with a mild soap, wait for about 15 to 20 minutes until skin dries up completely. I apply this cream on the affected spots. In the beginning I used to get slight tingling sensation. My skin had to get used to it. On the first time use, I kept it for 20 minutes and washed it. I did not actually experience any heating sensation as such but I just washed it to be on safer side. From second night I let it work on my face the whole night. It dries up your zits so damn wonderfully and your face appears fair. Its also a bleachi...

"Banish the Flakes: A Comprehensive Guide to Taming Dandruff"

Dandruff can be quite bothersome, but fortunately, there are several solutions available to help manage it. Here are some tips and remedies that may help alleviate dandruff: Use Anti-Dandruff Shampoo : Look for shampoos specifically designed to target dandruff. These shampoos typically contain ingredients such as zinc pyrithione, selenium sulfide, ketoconazole, or coal tar, which can help reduce dandruff. Wash Hair Regularly : Regularly washing your hair helps keep your scalp clean and prevents the buildup of oils and dead skin cells, which can contribute to dandruff. Scalp Massage : Massaging your scalp while shampooing can help loosen flakes and improve circulation, promoting a healthier scalp. Avoid Certain Hair Products : Some hair products can exacerbate dandruff. Avoid using hair sprays, gels, and styling creams that may contribute to oil buildup on the scalp. Limit Stress : Stress can worsen many health conditions, including dandruff. Practice stress-reduction techniques such as...