[WQL] How to compare LastModified with current date?



Goodday,

at the moment I'm experimenting with MOM.
I would like to set a query on a file which checks if the
'LastModified'-date is less than the current date (so the LastModified
date must be yesterday, i.e.)

The query would be something like:
if TargetInstance.LastModified < currentDate

At this moment, I have the following query:

select * from __InstanceCreationEvent WITHIN 60 WHERE
TargetInstance ISA 'CIM_DataFile' AND TargetInstance.Name =
'c:\\file1.txt' and TargetInstance.LastModified < ???


Can somebody help me completing this script? I'm completely new to
this, and I've searched for a couple of hours but I can't find the
solution.
The script should only check on date (not on time).

Thank you very much

Cis
.



Relevant Pages

  • Re: HELP! Need AD Query for Last login
    ... query the DCs in the USA domain, how would I modify the script? ... I'm new to VB script and making this simple modification is beyond me at ... >> ' Because the lastLogon attribute is not replicated, ... Then, for each Domain Controller, ADO is used to search the ...
    (microsoft.public.scripting.vbscript)
  • Re: LDAP query information
    ... a "Dim" statement. ... script is run. ... Microsoft MVP Scripting and ADSI ... Can you please provide me info on what to do with the below query? ...
    (microsoft.public.windows.server.scripting)
  • Re: LDAP query information
    ... execution of the vbscript? ... The error message indicates the line number in the script, ... Dim strBase, strFilter, strAttributes, strQuery, adoRecordset ... ' Construct LDAP syntax query. ...
    (microsoft.public.windows.server.scripting)
  • Re: An application, script, or AD Saved query that ...
    ... It is a multi-step operation as you can't create a query that says give me all users who aren't in a mail enabled group. ... So the most efficient way I can visualize this is that your script will need to find all members of all mailenabled groups. ... This you will enumerate the members and stick them in a hash/dictionary/whatever it is called in the scripting language you use, basically you want an associative array. ...
    (microsoft.public.windows.server.active_directory)
  • Re: LDAP query information
    ... The error message indicates the line number in the script, ... Dim strBase, strFilter, strAttributes, strQuery, adoRecordset ... Set adoConnection = CreateObject ... ' Construct LDAP syntax query. ...
    (microsoft.public.windows.server.scripting)