我如何计算两个日期之间的天数
How i can calculate days between two dates
我想在PowerBuilder11.5中写代码来计算余额在提款或存款过程中保持原样的天数。
计算 1/1/2016 到 1/6/2016 之间的天数并在数据中显示结果 window。
------------------
Table of processes
Acc_no /date/transaction/amount/balance
------------------
(1)(25/1/2016)(debit)(500)(1500)
---------
(1)(16/2/2016)(credit)(700)(2200)
---------
(1)(5/5/2016)(debit)(1500)(700)
使用DaysAfter
函数。来自文档:
Description
Gets the number of days one date occurs after another.
Syntax
DaysAfter ( date1, date2 )
Return value
Long. Returns a long containing the number of days date2 occurs after
date1. If date2 occurs before date1, DaysAfter returns a negative
number.
我想在PowerBuilder11.5中写代码来计算余额在提款或存款过程中保持原样的天数。
计算 1/1/2016 到 1/6/2016 之间的天数并在数据中显示结果 window。
------------------
Table of processes
Acc_no /date/transaction/amount/balance
------------------
(1)(25/1/2016)(debit)(500)(1500)
---------
(1)(16/2/2016)(credit)(700)(2200)
---------
(1)(5/5/2016)(debit)(1500)(700)
使用DaysAfter
函数。来自文档:
Description
Gets the number of days one date occurs after another.
Syntax
DaysAfter ( date1, date2 )
Return value
Long. Returns a long containing the number of days date2 occurs after date1. If date2 occurs before date1, DaysAfter returns a negative number.