Here I found a solution. It works!!
package "${PACKAGE_NAME}" /inline;
method execute(in_out double sasdtvalue,
in_out double sasdtval,
in_out double sasd,
in_out double sastm,
in_out varchar fmtdate,
in_out varchar fmttime,
in_out varchar fmtdt,
in_out varchar datewithtime,
in_out double mon,
in_out double d,
in_out double y,
in_out double h,
in_out double m,
in_out double s);
dcl timestamp DS2ts ;
dcl varchar(32) expression;
re=prxparse('/(\d+)\/(\d+)\/(\d+)\s+(\d+):(\d+):(\d+)/');
if prxmatch(re, datewithtime) then
do;
d=prxposn(re, 1, datewithtime);
mon=prxposn(re, 2, datewithtime);
y=prxposn(re, 3, datewithtime);
h =prxposn(re, 4, datewithtime);
m =prxposn(re, 5, datewithtime);
s =prxposn(re, 6, datewithtime);
end;
h2s = h*60*60;
m2s = m*60;
fraction = h2s+m2s+s;
sasdtval = mdy(mon,d,y);
sasdtvalue = (sasdtval*86400)+fraction;
sasd = datepart(sasdtvalue);
sastm = timepart(sasdtvalue);
fmtdate = put(sasd, yymmdd10.);
fmttime = put(sastm, time.);
fmtdt = put(sasdtvalue, datetime21.7);
end;
endpackage;
... View more