Showing posts with label Date and time. Show all posts
Showing posts with label Date and time. Show all posts

Sunday, January 06, 2013

Sharepoint Search between two dates

Searching between two dates in a list.
this is not a default view in 2003.
there are links that enable and help is understanding more about it.

in simple terms. Create 2 text boxes in form
and name them start date and end date

create parameter in data view  for start date and end date

create filter for start date and end date

set default value for start date as 1500-01-01

default value for end date as 3500-01-01 - this will display all items

connect the boxes and use the format as yy-mm-dd else it wont work
important references:


http://yanlinglei.blogspot.in/2010/02/filter-between-two-dates-using-dataview.html

http://yanlinglei.blogspot.in/2008/11/filter-between-two-dates-date-range.html


http://social.technet.microsoft.com/Forums/eu/sharepointadminlegacy/thread/a8cce2af-3900-4421-8fc0-91d9adc315ad

datepicker() modified as
datepicker({ dateFormat: 'yy-mm-dd'});

http://docs.jquery.com/UI/Datepicker/formatDate

http://stackoverflow.com/questions/7500058/how-to-change-date-format-mm-dd-yy-to-yyyy-mm-dd-in-date-picker


Text boxes sample - form webpart
------------------

<div onkeydown="javascript:if (event.keyCode == 13) _SFSUBMIT_">
<head>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="jquery-ui.css" />
    <script src="jquery-1.8.3.js"></script>
    <script src="jquery-ui.js"></script>
    <link rel="stylesheet" href="style.css" />
  
 <script>
   $(function()
     {
     $( "#datepicker" ).datepicker({ dateFormat: 'yy-mm-dd'});
     $( "#datepicker1" ).datepicker({ dateFormat: 'yy-mm-dd'});
     });
    </script>
</head>
Start Date: <input type="text" name="T1" id="datepicker" />
End Date : <input type="text" name="T2" id="datepicker1" /><input type="button" value="Go" onclick="javascript:_SFSUBMIT_"/>
</div>
</html> 

Thursday, July 26, 2012

Date and Time Difference calculator

Look what I just found!!!


=DATEDIF([In-Progress Time],[Closed time]-(MOD([In-Progress Time],1)>MOD([Closed time],1)),"d")&" days, "&TEXT(MOD([Closed time]-[In-Progress Time],1),"hh "" hrs, "" mm "" mins""")

Tuesday, July 24, 2012

Color Gantt Chart

<script type="text/javascript" src="/teams/IOBE/Canttouch%20this/jquery-1.3.2.min.js"></script>
<script type="text/javascript">
// Set PicturesPath to the URL of the library that hosts the bar images:
var PicturesPath = "/teams/IOBE/Canttouch%20this/Images";

// Collect the priority level for each task
var barColours = new Array();
var regex = /\(\d\)\s(Amar\sNaidu|Baz\sSelwyn|Carol\sFrancis|Renjiv\sRaman|Ayesha\sSultana)/;
// Find the tasks summary list
var TasksList = $(".ms-ganttOuterTable").siblings("table").find(".ms-summarystandardbody>tbody>tr:not(.ms-viewheadertr)");
if (TasksList.length == 0) TasksList = $(".ms-ganttOuterTable").siblings("table").find(".ms-listviewtable>tbody>tr:not(.ms-viewheadertr)");

TasksList.each(function(i){
try {
barColours[i] = regex.exec($(this).text())[0].substr(1,1);
}
catch(err) {barColours[i] ="";}
});
// Modify the bar color according to priority
$(".ms-ganttTaskRow").each(function(i){
$(this).find("img").each(function(){
       var source=this.src;
       source = source.replace(/.gif/, barColours[i]+".gif");
       source = source.replace(/\/_layouts\/images/,PicturesPath);
       this.src=source;
});
});
//Optional: hide the list under the Gantt view
$(".ms-summarystandardbody").hide();
$(".ms-listviewtable").hide();
</script>

Followers

No Locks without Key

🌿 Bible Verse 1 Corinthians 10:13 "No temptation has overtaken you except what is common to mankind. And God is faithful; ...

Who Am I?

My photo
What is mankind that you are mindful of them, human beings that you care for them? Psalms 8:4 But he made us a little lower than Angels and Crowned with Glory and Honor. How majestic is your name in all the Earth Oh Lord our God!