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.
如何将分钟添加到 DATETIME 字段?
08/12/2013 11:00:00 PM + 120 minutes
您可以只使用添加 (+) 符号,但该值以秒为单位添加。 120 分钟是 7200 秒。
NewDateTime = OldDateTime + 7200
或者,如Tamar所指出的,为了编码清晰:
NewDateTime = OldDateTime + (120 * 60)