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.
如何从 PowerBuilder 中的日期减去 30 天?
我有以下代码在参数中返回今天的日期,但我需要今天 - 30 天:
dw_1.setitem(1, "begin_datetime", datetime(today(), Now()))
您可能正在寻找该RelativeDate功能。不幸的是,它需要 aDate而不是 aDateTime作为参数,但我们可以解决这个问题:
RelativeDate
Date
DateTime
dw_1.setItem(1, "begin_datetime", DateTime( RelativeDate( today(), -30), Now() )