将日期公式转换为日期时间
在业务中心中有一个名为DateFormula的数据类型,您可以在其中定义“1D + 2H + 3S”(1天2小时3秒)之类的内容。我发现我可以使用 CalcDate() 将此时间范围转换为日期,但是,日期对象不包含我确实需要的时间信息。
BC 中没有 CalcDateTime()
函数,也没有提到在网上任何地方将 DateFormula 转换为 DateTime。
在 BC 中如何将 DateFormula 转换为 DateTime 对象?
In business central there is this data type named DateFormula, in it you can define things like '1D + 2H + 3S' (1 day, 2 hours and 3 seconds). I found out that i can convert this time range to a Date using CalcDate()
however, Date objects dont contain the time information, which I do need.
There is no CalcDateTime()
function in BC, nor does it mention converting DateFormula's to DateTime anywhere online it seems.
How can I convert a DateFormula to a DateTime object in BC?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,显然 DateFormula 数据类型甚至不支持小时和秒之类的东西,只支持日期而不支持时间。
解决了!
OK so apparently it turns out that DateFormula datatype does not even support things like hours and seconds, only dates and no times.
Solved!