![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi all,
I try to use the find funtion comapring 2 properties I want to add to my listbox all items that mileage is greater than 50000 at a specific day then pb is that ceationtime is like dd/mm/yyyy hh:mm:ss so i want to use date() function to convert the creationtime to dd/mm/yyyu item.mileage Var1 and the item.creationtime= Var2 set myItem = Items.Find("[mileage] """ & myvar1 & """ and date(myitem.creationtime) = """ & myVar2"""") I tryed many sintax but no one work tks for help |
Ads |
#2
|
|||
|
|||
![]()
The Date function either sets or retrieves the system date. It doesn't do
anything close to what you want to do. You also can't use seconds in a Find or Restrict. The Help on Items.Restrict lists all the properties you can't use for a filter and shows some pretty good examples of filters you can use. For what you want it probably would be something like: sFilter = "[Mileage] " & Var1 sFilter = sFilter & " And [CreationTime] = '" & Format(Var2, "ddddd h:nn AMPM") & "'" Set myItem = Items.Find(sFilter) -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "news.microsoft.com" wrote in message ... Hi all, I try to use the find funtion comapring 2 properties I want to add to my listbox all items that mileage is greater than 50000 at a specific day then pb is that ceationtime is like dd/mm/yyyy hh:mm:ss so i want to use date() function to convert the creationtime to dd/mm/yyyu item.mileage Var1 and the item.creationtime= Var2 set myItem = Items.Find("[mileage] """ & myvar1 & """ and date(myitem.creationtime) = """ & myVar2"""") I tryed many sintax but no one work tks for help |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlk 2k3 script: How to get the name of the month | news.microsoft.com | Outlook and VBA | 2 | November 21st 06 02:35 PM |
Outlk 2k3 : Publishing my form to all Outlook User | bbnimda | Outlook and VBA | 3 | November 20th 06 10:09 PM |
Outlk 2k3 script: Tab in body Task "space to separate text" | news.microsoft.com | Outlook and VBA | 1 | November 17th 06 02:13 PM |
Outlk 2k3 Script: Pb Using Find function Help plz!!! | news.microsoft.com | Outlook and VBA | 1 | November 15th 06 03:40 PM |
Find......FindNext | Junoon | Outlook and VBA | 3 | June 16th 06 09:06 PM |