How to make present date and time setter in X axis of XY chart.
Since, I've used this code
date = system.date.getDate(2023, 4, 18)
print system.date.setTime(date, 1, 37, 44)
It's showing error.
What is a 'present date and time setter'?
It's showing error.
What is showing error? Designer? Browser? Component? Script Console? What is the error message?
Post a cropped screen shot of what you are trying to do and show the problem.
- You can't write scripts in expression bindings. You can only use expressions. See Expression Language and Syntax - Ignition User Manual 8.1 - Ignition Documentation.
- The list of Expression Fuctions is here: Expression Functions - Ignition User Manual 8.1 - Ignition Documentation
- You can't use the
=
assignment (but you can use it for comparison). Think of expressions as being like Excel formulas. -
Print
works in Script Console. -
system.date
functions are for Python scripting. They can't be used in expressions. See System Functions - Ignition User Manual 8.1 - Ignition Documentation.
Now for what you are trying to fix:
Set xAxes.0.date.format : yyyy-MMM-dd
.
You don't need an expression.
What's the method to pick the date and time in props.datasource.example?
You can't pick a date directly on the XY Chart.
1 Like
Ok, thanks