Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Document search between two given dates
rajasekhar
I am using worksite8.0 and writing a web application in C-sharp.
I need to perform document search by an Edit Date range or Create Date range,
I managed to get search working on a single date.
How can I perform the search between two dates (date range).
How to set the IManProfileSearchParameters
does the search supports other operators like '<' or '>' for comparision.
Can any one give me some pointers please.
Many thanks
Raja sekhar
Find more posts tagged with
Comments
Migrateduser
This might help you.
Cheers
G
// objDMS is a valid DMS object.
// Create an instance of the IManDateRange object.
IManDateRange oDateRange = objDMS.CreateDateRange();
// Set absolute date range.
oDateRange.DateRangeType = imDateRangeType.imAbsoluteDateRangeType;
// Set date range using the Value Property.
DateRange.Value = "03/31/03 - 03/31/04";
// Get absolute date range.
MessageBox.Show(oDateRange.Value);
// Set date range using IManDate.Value Property; e.g., "03/28/04 -
// 03/31/04"
IManDate oStart = oDateRange.AbsoluteStartDate;
IManDate oEnd = oDateRange.AbsoluteEndDate;
oStart.Value = _
System.DateTime.Today.Subtract(TimeSpan.FromDays((double)3));
oEnd.Value = System.DateTime.Today;
// Get Start Date and End Dates in the absolute date range.
MessageBox.Show(oStart.Value.ToString() + " -- " + _
oEnd.Value.ToString());
// Set relative date range; eg., A month ago.
oDateRange.DateRangeType = imDateRangeType.imRelativeDateRangeType;
oDateRange.RelativeGranularity = imGranularity.eMonth;
IManRelativeDate oRelStart = oDateRange.RelativeStartDate;
IManRelativeDate oRelEnd = oDateRange.RelativeEndDate;
oRelStart.Value = -1; // A month before now
oRelEnd.Value = 0; // Now
rajasekhar
Excellent! That solved my problem
Thanks a Ton!!!!!!
Raja Sekhar