G
Guest
I am using ExecQuery to select files from a directory
older than a certain date. It seems that the second date
format specified in
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/wmisdk/wmi/date_and_time_format.asp
is wrong. The month and day fields of the second format
seem backward. In the following commands, I want to get
all files earlier than say 10/09. The first command
returns only files earlier than 9/10. The second returns
files up through 10/8, even though the month and day are
reversed. I've tried this on my MS XP machine and a
customer's Win2K server. Note that the first datetime
format seems to NOT work on 2000, throwing
an "unspecified" error if used in WQL and passed to
ExecQuery.
Select * from CIM_DataFile where
Path='\\logs\\current\\sdelmccrqm021\\' and Drive='c:'
AND LastModified <= '2003-10-09 00:00:00:000'
Select * from CIM_DataFile where
Path='\\logs\\current\\sdelmccrqm021\\' and Drive='c:'
AND LastModified <= '2003-09-10 00:00:00:000'
older than a certain date. It seems that the second date
format specified in
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/wmisdk/wmi/date_and_time_format.asp
is wrong. The month and day fields of the second format
seem backward. In the following commands, I want to get
all files earlier than say 10/09. The first command
returns only files earlier than 9/10. The second returns
files up through 10/8, even though the month and day are
reversed. I've tried this on my MS XP machine and a
customer's Win2K server. Note that the first datetime
format seems to NOT work on 2000, throwing
an "unspecified" error if used in WQL and passed to
ExecQuery.
Select * from CIM_DataFile where
Path='\\logs\\current\\sdelmccrqm021\\' and Drive='c:'
AND LastModified <= '2003-10-09 00:00:00:000'
Select * from CIM_DataFile where
Path='\\logs\\current\\sdelmccrqm021\\' and Drive='c:'
AND LastModified <= '2003-09-10 00:00:00:000'