DateTimeInput - which datatype to use?

Hi there. I want to get the date and time from the datetimeinput, via OPCUA. I dont get which datatype i should use for this?
image

The calendar icon on the value property shows you that is a date/time type already.

  • Create a memory tag of type dateline.
  • Bind your DateTimeInput value property to the tag.

The remote OPC UA client should now be able to read the tag.

Note that you have picked type set to time. Check the options.

Thank you. But im not quite sure how to do this. I have created a new memory tag, then drag and drop it to the datetimepicker like this:

When i go online, i get this error:

Any ideas?

That's strange.

  • Check the binding (blue link icon) and make sure it's set to bidirectional. That will allow the component to write to the tag - otherwise it can only read it (but I don't think that's the problem).
  • If the red error triangle is showing at the top right of the Property Editor pane then hover over it and get the error message.
  • There's an 'i' icon on the error message. Does that give you anything?

Thanks. It is set to bidirectional, and there is no error message :confused:

Good.
Don't forget to mark my post above as the solution. It may help others.

Sorry, i meant that there was no error message. I still got the same issue.

When i tried to format to 23:22, i get this error though.

EDIT:
Now I understand what you meant regarding the "i" in the error. This is what it tells me:

EDIT 2:
I dont know why, but now it works. but i can only change the hour between 22 and 23:
image

More checks:

  • What is the datatype of your tag? Make sure it is datetime (or whatever they call it).
  • Check if the minDate and maxDate properties are limiting the settings.

A quick check is to create a second DateTimeInput component and bind that to the same tag. It will give you a clean start.

If you're going to type a value into the component properties value field then it has to be a full datetime, e.g., value : 2023-10-14 22:13:00 including the ss. An easier way to modify it is to select the calendar icon to the right of the value property.

Thank you. I tried to delete it, and use a new component, still the same issue. Also noe effect when changing the min and max :confused:

OK. Right-click on the binding and disable it. Run the Designer preview mode and see if the component works.
If that's OK then launch the project and test it in a browser.
Report back - but it's midnight in Ireland!

I've already tried it, both in designer preview and browser. Thanks for helping out, and good night. Its late in Norway aswell :slight_smile: