当前日期时间减去未来时间剩余多少天,怎么写?
本帖最后由 cj4025 于 2020-7-24 15:48 编辑当前日期时间减去未来时间剩余多少天,怎么写?
MsgBox(0,"提示","已过"&_datatime()&"天",0)
Func _datatime()
$timeout1 = '20200824'
$timeout2=""&@YEAR&""&@MON&""&@MDAY&""
If $timeout2-$timeout1<=0 Then
MsgBox(0,"警告","时间已到,关闭",0)
MsgBox(0,"提示","剩余时间"&($timeout2-$timeout1)&"天",0)
MsgBox(0,"测试提示","时间"&$timeout1&"",0)
MsgBox(0,"测试提示","时间"&$timeout2&"",0)
Exit
Else
MsgBox(0,"提示","剩余时间"&($timeout2-$timeout1)&"天",0)
EndIf
EndFunc
高手帮忙
#include <Date.au3>
$iDateCalc = _DateDiff( 'D',"2020/02/01","2023/08/08")
MsgBox( 4096, "", $iDateCalc& " 天")
看到这个可以解决问题啦。 原来已经有了...刚打算自己写一个...
页:
[1]