在 Anylogic 中将字符串转换为日期和时间
Convert strings to date and time in Anylogic
我的代理有以下信息作为参数:
年、月、日、时、分秒。现在我想通过使用将所有这些参数转换为日期
toDate(year, month, hour, minute, second)
但不知怎的,我仍然得到错误,我只能包括三件事来约会(见下图)但我也想包括时间我该怎么做?
您可以使用 toDate(int, int, int, int, int, int)
(即 6 个参数,而不是 4 个),如下所示:
PS:学习使用代码完成(在 Windows 上按 Ctrl+space)这样您就可以自己获得这些有用的弹出窗口:)
我的代理有以下信息作为参数:
年、月、日、时、分秒。现在我想通过使用将所有这些参数转换为日期
toDate(year, month, hour, minute, second)
但不知怎的,我仍然得到错误,我只能包括三件事来约会(见下图)但我也想包括时间我该怎么做?
您可以使用 toDate(int, int, int, int, int, int)
(即 6 个参数,而不是 4 个),如下所示:
PS:学习使用代码完成(在 Windows 上按 Ctrl+space)这样您就可以自己获得这些有用的弹出窗口:)