Home > database >  Convert strings to date and time in Anylogic
Convert strings to date and time in Anylogic

Time:12-07

my agent has the next information as parameters: year, month, day, hour, minute second. Now I want to transform all these parameters to a date by using toDate(year, month, hour, minute, second) But somehow I still get the error that I can only include three things to make a date (see picture below) But I also want to include the time how can I do this?

enter image description here

CodePudding user response:

You can use toDate(int, int, int, int, int, int) (i.e. 6 arguments, not 4) as below: enter image description here

PS: Learn to use code-complete (Ctrl space on Windows) so you get these helpful popups yourself :)

  • Related