|Date: ||Thu, 10 Jul 2003 23:02:17 +1000|
|Reply-To: ||Craig and Mary Hansen <email@example.com>|
|Sender: ||"SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>|
|From: ||Craig and Mary Hansen <firstname.lastname@example.org>|
|Subject: ||Deleting cases|
|Content-Type: ||text/plain; charset="iso-8859-1"|
Thanks to Martins, Rebecca, Mahbub, and Jose for helping with my problem of deleting cases, all your answers worked fine. I have one other problem to add to it.
I also want to delete cases that fit a particular condition of a variable but the variable is in date format (dd.mm.yy). For example, just say I want to delete cases that have a value of 02.05.91(dd.mm.yy) in the variable labelled 'date'. I also want to do it for a variable labelled 'time' which is also in date format (hh.mm).
I tried the following syntax but it didn't work. I figure I need something in the syntax to show that it is in date format?
SELECT IF (DATE NE 02.05.91).
*also the following sytnax for a value of 1pm)
SELECT IF (TIME NE 13.00).
Also, I have hourly data over several years, I want to delete a large number of cases that fall between either two time slots or two dates. For example, I want to delete all the cases that fall between the dates 04.04.91 thru to 30.12. 93. Finally, I also want the options of deleting cases that fall between the times of 8am to 5pm (8.00 to 17.00) or outside those times. I understand that I can use the following syntax for the time slots, but it doesn't recognise that it is in date format.
SELECT IF (TIME GE 8.00 AND TIME LE 17.00).
Thanks in advance for any help