Hi:
If you look at your character string, with an eye toward breaking it up into "chunks" or "pieces", every piece is separated from another piece by a space. This is a perfect situation to use the SCAN function. Following the pattern you laid out, then, you can create 5 character variables from your long string by using the SCAN function (let's assume you call the long character string variable CHARDATE)
[pre]
dow = scan(chardate,1,' ');
mon = scan(chardate,2,' ');
day = scan(chardate,3,' ');
time = scan(chardate,4,' ');
year = scan(chardate,5,' ');
[/pre]
Then once you have broken up your long character string into pieces, you can use the concatenation operators or the CAT functions to create new character strings, such as: 25Feb2011 or 11Mar2011 -- dealing with DATE values only.
With a new character variable (let's call this new variable CHARDATE2), you're still not ready to subtract 2 dates yet. You have to turn the newly arrranged character date (without the time or day of week) into a numeric date value, something like this:
[pre]
chardate2 = catt(day,mon,year);
numeric_date = input(chardate2,date9.);
[/pre]
Now, the NUMERIC_DATE variable will represent the number of days since Jan 1, 1960 - -so you could subtract the numeric_date from a date of your choosing (either another numeric date value or a date constant, as I show), to come up with a difference in number of days:
[pre]
diff = '21Jun2011'd - numeric_date;
[/pre]
The code could be streamlined quite a bit. I split the variables into so many pieces to illustrate how the SCAN function works and because you may want to create a date/time variable by creating a character string that can be transformed with the INPUT function using a date/time informat.
Hopefully, this will get you started.
cynthia