将日期公式转换为日期时间

发布于 2025-01-20 00:05:20 字数 257 浏览 5 评论 0原文

在业务中心中有一个名为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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧时模样 2025-01-27 00:05:20

好吧,显然 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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文