Get Date and format MM/dd/yyy - Pre IDM 3.5
I require a some assistance. My end goal is to put into a variable a date (current_day + 3) in MM/dd/yyyy format.
Bellow I've got to lines of variable code. Each one does half of what I require. I've tried putting the "current-day+3" variable into the code bellow for formatsuch as.....jformat:format(jformat:new('MM/dd/yyyy HH:mm:ss'), $current-day+3)
But I get an error saying can't convert object. Or is there a way to just scrap the first variable code and have everything all in one line of code?
Thanks for any help...
xmlns:jdate="http://www.novell.com/nxsl/java/java.util.Date" xmlns:jformat="http://www.novell.com/nxsl/java/java.text.SimpleDateFormat
<rule>
<description>Date Function</description>
<conditions>
<and>
<if-local-variable mode="nocase" name="TermFlag" op="equal">True</if-local-variable>
<if-global-variable mode="nocase" name="EmailAlert" op="equal">True</if-global-variable>
</and>
</conditions>
<actions>
<do-set-local-variable name="current-day+3">
<arg-string>
<token-xpath expression="round(jdate:getTime(jdate:new()) div 1000)+259200"/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="date_format">
<arg-string>
<token-xpath expression="jformat:format(jformat:new('MM/dd/yyyy HH:mm:ss'),jdate:new())"/>
</arg-string>
</do-set-local-variable>
</actions>
</rule>
|