Hello,
I have been reading blog after blog about displaying the current date in a sharepoint list and nothing seems to work. I do not have administrative rights to my sharepoint server but I was able to combine some java scripts and was able to display the current date (that change each day) in a custom list. My problem is that my success is only half full and I need someone's help to figure out the rest. Here it goes:
1. I created a column in my list called "DateField", I use the calculation field with ="<B></B>
as the calculation
2. I created a Content Edit WebPart and use the source below:
<script type="text/javascript">
var currentTime = new Date()
var month = currentTime.getMonth()+1
var day = currentTime.getDate()
var year = currentTime.getFullYear()
var CurrentDate = month + "/"+ day + "/" + year
$(document).ready(function(){
$(".ms-vb2:contains('<B')").each(function(){
var tempB = document.createElement ("B");
tempB.style.cursor = "pointer";
tempB.innerHTML = $(this).text();
$(this).text(CurrentDate);
$(this).append(tempB);
});
});
</script>
The script works and the date changes each day but I cannot use the date for anything. For some reason it only sees the HTML tags in the field but it displays the current date in the column on the list. Can someone help me figure out how I can store the actual date in the column?
Thanks Ramon