! pdatekey_dms
! Add some or all of day:min:sec
! to the labels in the date key according to the value of PLMlabel
!
! PLMlabel     add
!  1          :hh
!  2          :hh:mm
!  3          :hh:mm:sss

let dayfrac = `TAX_DAYFRAC(ttime, tpts)`
DEFINE SYMBOL hou = `INT(dayfrac*24)`
DEFINE SYMBOL min = `INT( (dayfrac*24 - ($hou))* 60)`
DEFINE SYMBOL sec = `INT( ( (dayfrac*24 - ($hou)) *60 - ($min)) *60)`

IF `STRLEN("($hou)") EQ 1` THEN DEFINE SYMBOL hou = 0($hou)
IF `STRLEN("($min)") EQ 1` THEN DEFINE SYMBOL min = 0($min)
IF `STRLEN("($sec)") EQ 1` THEN DEFINE SYMBOL sec = 0($sec)

IF `PLMlabel GT 0` THEN DEFINE SYMBOL dms = <NL>($hou)
IF `PLMlabel GT 1` THEN DEFINE SYMBOL dms = ($dms):($min)
IF `PLMlabel GT 2` THEN DEFINE SYMBOL dms = ($dms):($sec)
