Java Snippet - use of Date/time variable

Hi

my initial concern was to be able to use Date Variable to control the access on a database and to be able to increment the day by 1 .

Having looked in the various posts , I thought I had the solution by writing a Java snippet, ,but I have a syntax error on the parse method and I don't know how to fix it; 

I would be very grateful if someone more knowledgeable than me in Java could tell me what is wrong.

(I have attached a screenshot of the Java snippet configuration screen)

Brgds

Loys

Hi Loys,

String test = "";

SimpleDateTimeFormat date = new SimpleDataTimeFormat();

        try {
            date.parse(test);
        } catch (ParseException e) {
           throw new RuntimeException(e);
        }

 

Try surrounding your parse with a try/catch. Does this help?

Christian

 

The Date/Time Shift node is what you are looking for :)

It was published with 2.10

Hi Christian

Thanks for your help.

I have tried to use  try/catch but I have still syntax error (see attached file)

BRgds

Loys

Hi Iris

Thanks for your answer.

The Date/Time Shift node looks to work only for table and not for variables;

I will anyway install the release 2.10 and check the new node with variable to tablerow and tablerow to variable.

BRgds

Loys