Im using a source block in Anylogic and I want to use the selected arrival date as a string in another code.
I want to use the “cle” as a string for defining a function. Does anyone know how I can access it?
Many thanks for your help in advance.
Use the “Database query wizard” to get access to any data you want.
Or, if you want to just print the date when it creates a new agent in the source, type traceln(date().toString())
in the Source
block’s “on arrival” code box.
Or call your function in that code box using myFunction(date().toString())
assuming the function needs a String input and sits on the same agent type as the source
3