Novell is now a part of Micro Focus

Retrieving Date/Time Text Strings via Java

Novell Cool Solutions: Tip
By David Gersic

Digg This - Slashdot This

Posted: 30 May 2007


A Forum reader recently asked:

"I'm no java programmer, and I could use a hand. I'm looking for a simple xpath call to Java that retrieves the Date/Time in a text string, including any arrangement of Month, Day, Year, Hours, Minutes and Seconds. Namespace reference would be useful, too."

And here's the response from David Gersic ...


Try this:

<?xml version="1.0" encoding="UTF-8"?>

  <description>Put object create date info to Description
    <if-class-name op="equal">User</if-class-name>
   <do-set-dest-attr-value name="Description">
    <arg-value type="string">
     <token-text xml:space="preserve"
xmlns:xml="">Account created:
     <token-xpath expression="jformat:format(jformat:new('MM/dd/yyyy

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates