Current Date and time on Blog

Some blogger want to put current date and time on blog they ask me, How to Put Current Date and Time? After this Question I am posting this post about current Date and time on Blog. Nicely Design code for your blog, you can also modify this code as per your choice but don’t change Script. Try this

Layout>Add a Gadget>HTML/JavaScript (Copy given code below and Paste it)

<div align="left">
<table border="1" width="190"><tr>
<td bg width="180">
<font >Today Date is <script type="text/javascript">
<!--
var currentTime = new Date()
var month = currentTime.getMonth() + 1
var day = currentTime.getDate()
var year = currentTime.getFullYear()
document.write(month + "/" + day + "/" + year)
//-->
</script></font></td></tr></table></div>
<div align="left"><table border="1" ><tr>
<td bgcolor="#008000" width="179">
<font color="#FF0000">Current Time is <script type="text/javascript">
<!--
var currentTime = new Date()
var hours = currentTime.getHours()
var minutes = currentTime.getMinutes()
if (minutes < 10){
minutes = "0" + minutes
}
document.write(hours + ":" + minutes + " ")
if(hours > 11){
document.write("PM")
} else {
document.write("AM")
}
//--></script></font></td></tr><tr>
<div>
<center><font size="1" color="#FF0000"><b><a href="http://bloghacktips.blogspot.com" target="_blank">Add
this</a></b></font>
</td></tr></table></div>
<p align="center"><center>

1 comment:

  1. Hello! Thanks for adding me in your BC list. I added you back :)

    These are nice tips and very helpful to our fellow bloggers. Keep it up :)

    ReplyDelete

Thanks For Your Comment. You can also reach me at my mai Id :- blogtips.frd@gmail.com