, , Outlook . , ToSting
DateTime
:
DateTime dt = new DateTime(DateTime.Now.Year, DateTime.Now.Month,
DateTime.Now.Day, 23, 59, 00, 00);
string dateTimeEnd = dt.ToString("MM/dd/yyyy hh:mm tt");
string searchCriteria = "[Start]<=\"" + dateTimeEnd + "\"" + " AND [End]>=\""+ dateTimeStart +"\"";
VB.NET, :
VBA Format
. MSDN:
Dates and times are usually stored in date format, the Find and Restrict methods require that the date and time be converted to a string representation. To ensure that the date is formatted as expected by Microsoft Outlook, use the Format function. The following example creates a filter to search for all contacts that were changed after January 15, 1999 at 3:30 pm.
sFilter = "[LastModificationTime] > '" & Format("1/15/99 3:30pm", "ddddd h:nn AMPM") & "'"
source
share