Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有人可以指导我如何将超过 6 个字符转换为 int 吗?因为我需要在转换为 int 后进行求和。我尝试了很多方法,例如CInt, CLng,等仍然抛出指数值。
CInt, CLng
Stroutput = 2018050302216556 Sum = Stroutput + 1
我尝试使用正确的功能分成几个夹头,但看起来不太好。可以管理,但我需要另一种选择。谢谢
您似乎正在使用日期结构,正如 VBS 所说 - 很难仅表示为数字。使用 CDate 从字符串中获取日期对象(如果需要,将该字符串的表示更改为(YYYY-mm-dd ...)。使用 DateAdd 方法,您可以添加天数、年数等;最后 FormatDateTime 将创建您希望的输出。
(YYYY-mm-dd ...)