Hello all,
I am trying to convert a string of numbers coming in through a Delimited
Text Driver to a !CTIME to store in another variable inside a TIME
syntax attribute. I saw in some previous posts on here that
token-convert-time would likely be the best way to accomplish this.
Here is the trace where I'm still not quite getting it to work and I'm
wondering why. I stored the string in a local variable and then tried
to use token-convert-time, but it seems like it lost the value in the
middle of trying to perform the convert. Any help is greatly
appreciated.

-Morgan

[02/12/15 16:05:16.658]:empref PT: Evaluating selection criteria for
rule 'Format Termination Date'.
[02/12/15 16:05:16.658]:empref PT: (if-op-attr
'utcIrisTerminationDate' available) = TRUE.
[02/12/15 16:05:16.658]:empref PT: Rule selected.
[02/12/15 16:05:16.658]:empref PT: Applying rule 'Format Termination
Date'.
[02/12/15 16:05:16.658]:empref PT: Action:
do-set-local-variable("lv-TerminationDateTimeConvert",scope="policy",token-op-attr("utcIrisTerminationDate")).
[02/12/15 16:05:16.658]:empref PT:
arg-string(token-op-attr("utcIrisTerminationDate"))
[02/12/15 16:05:16.659]:empref PT:
token-op-attr("utcIrisTerminationDate")
[02/12/15 16:05:16.659]:empref PT: Token Value: "20150131".
[02/12/15 16:05:16.659]:empref PT: Arg Value: "20150131".
[02/12/15 16:05:16.659]:empref PT: Action:
do-reformat-op-attr("$lv-TerminationDateTimeConvert$",token-convert-time(dest-format="!CTIME",dest-tz="EST",src-format="yyyyMMdd")).
[02/12/15 16:05:16.659]:empref PT: Expanded variable reference
'$lv-TerminationDateTimeConvert$' to '20150131'.
[02/12/15 16:05:16.659]:empref PT: Action:
do-set-dest-attr-value("$lv-TerminationDateTimeConvert$",token-convert-time(dest-format="!CTIME",dest-tz="UTC",src-format="yyyyMMdd")).
[02/12/15 16:05:16.660]:empref PT: Expanded variable reference
'$lv-TerminationDateTimeConvert$' to '20150131'.
[02/12/15 16:05:16.660]:empref PT:
arg-string(token-convert-time(dest-format="!CTIME",dest-tz="UTC",src-format="yyyyMMdd"))
[02/12/15 16:05:16.660]:empref PT:
token-convert-time(dest-format="!CTIME",dest-tz="UTC",src-format="yyyyMMdd")
[02/12/15 16:05:16.660]:empref PT:
token-convert-time(dest-format="!CTIME",dest-tz="UTC",src-format="yyyyMMdd")
[02/12/15 16:05:16.660]:empref PT: Arg Value: "".
[02/12/15 16:05:16.661]:empref PT:
DirXML Log Event -------------------
Driver: \DPATRIOT\utc\IDM\dPatriotDriverSet\Empref
Channel: Publisher
Status: Warning
Message: Code(-8033) Error in
vnd.nds.stream://DPATRIOT/utc/IDM/dPatriotDriverSet/Empref/Publisher/PubEventXform-FormatAttributes#XmlData:70:
Couldn't convert date/time '': java.text.ParseException: Unparseable
date: ""


--
morganginga
------------------------------------------------------------------------
morganginga's Profile: https://forums.netiq.com/member.php?userid=6370
View this thread: https://forums.netiq.com/showthread.php?t=52821