1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
* (Q) Extract the time portion from a string including date and time.
* (A) Ray 2001/10/31.

DATA LIST FIXED /date1 1-17(DATETIME).
BEGIN DATA
08/01/2001 10:15
08/10/2001 12:00
05/04/2001 09:15
08/02/2001 11:45
END DATA.
LIST.

VARIABLE WIDTH date1(18).
STRING date2(A19).
COMPUTE date2=STRING(date1,DATETIME18).

SAVE TRANSLATE OUTFILE='C:\\Temp\\tab delimined.dat'
  /TYPE=TAB /MAP /REPLACE /FIELDNAMES /DROP=date1 /RENAME=(date2=date1).