system.date.addDays Error in perspective

Hi,

I’d like to use system.date.addDays to add one day at my variable : date
image

But it give this error :
com.inductiveautomation.ignition.common.script.JythonExecException: Traceback (most recent call last): File “”, line 6, in runAction TypeError: addDays(): 1st arg can’t be coerced to java.util.Date

Should i parse it with system.date.parse ?
Or should I change my format of my value

The script :

In Perspective, properties are a boolean, an integer or a string – there is no date type. So yes, you will need to parse it into a date before using addDays().

image

Still not working I dont understand why It’s a Unperseable date

com.inductiveautomation.ignition.common.script.JythonExecException: Traceback (most recent call last): File “”, line 6, in runAction at java.base/java.text.DateFormat.parse(Unknown Source) at com.inductiveautomation.ignition.common.script.builtin.DateUtilities.parse(DateUtilities.java:437) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) java.text.ParseException: java.text.ParseException: Unparseable date: “15/05/2019 11:14:46”

My value come from my data base and I added a transform format to a DateTime ( short medium), should I do something else ?

You’re trying to parse the date as yyyy-MM-dd but your date is dd/MM/yyyy