For the module TextExpander , you may get something like the date format DDMMYYYY 20 days ago?
Is it possible to subtract or add days to the current date and get the result with % A_DD %% %% A_YYYY % A_MM format ?
Calculation Date
Possible, of course.
You need to use the Type: Command
There are many other possibilities: http://www.autohotkey.com/docs/commands/FormatTime.htm
You need to use the Type: Command
Code: Select all
Date:=A_Now
Date+=-20, Days
FormatTime, Date, %Date%, dd/MM/yyyy
Send, 20 days from now was %Date%.
I like your code above.
But I would like to show a future date in 8 business days (excluding Saturday and Sunday) What adjustment do I need to make to the code to allow for non-delivery on weekend days?
Date:=A_Now
Date+=+8, Days
FormatTime, Date, %Date%, dd/MM/yyyy
Send, 8 business days from now is%Date%.
Much appreciated for your help.
But I would like to show a future date in 8 business days (excluding Saturday and Sunday) What adjustment do I need to make to the code to allow for non-delivery on weekend days?
Date:=A_Now
Date+=+8, Days
FormatTime, Date, %Date%, dd/MM/yyyy
Send, 8 business days from now is%Date%.
Much appreciated for your help.
Code: Select all
Days:=8
BDays := 0
While (BDays < Days)
{
Today += 1, D
FormatTime, WDay, %Today%, WDay
If (Wday <> 1) && (WDay <> 7) ; not Sunday and not Saturday
BDays++
}
FormatTime, Date, %Today%, dd/MM/yyyy
Send, %Days% business days from now is %Date%.