F
PL_
PL_
PL_FROMDATE({%})
IF INDEX({%1},',',1) THEN
   T$$$ = OCONV(TRIM(FIELD({%1},',',2)),'MCU')
   WORDS$$$ = COUNT(T$$$,' ')
   BEGIN CASE
      CASE WORDS$$$ <= 1
         {R} = 0
      CASE WORDS$$$ <= 3
         {R} = ICONV(FIELD(T$$$,' ',1),'D') * 86400 + ICONV(FIELD(T$$$,' ',2),'MTS')
      CASE YES
         {R} = ICONV(OCONV(T$$$,'G0 3'),'D') * 86400 + ICONV(FIELD(T$$$,' ',4),'MTS')
   END CASE
END ELSE
   T$$$ = OCONV(TRIM({%1}),'MCU')
   {R} = ICONV(OCONV(T$$$,'G1 3'),'D') * 86400 + ICONV(FIELD(T,' ',5),'MTS')
END
