Date Calculator

Suggestions, feature requests and bug reports.
Post Reply
User avatar
marcelolima
Posts: 37
Joined: Apr 11th, ’22, 00:04

Post by marcelolima » Sep 1st, ’22, 11:35

Hello, Team.

I have a need for a script to add an amount of days to a date.

For example: I should select the date such as 09/01/2022 (mm/dd/yyyy) and enter the number of days I want to add (for example: 90) and FastKeys reports the result: 11/30/2022.

In the calculation system offered by FastKeys, the application don’t have the option for the result to be found in date format, such as MM/DD/YYYY or DD/MM/YYYY.

https://www.fastkeysautomation.com/docu ... ation.html

If it is not difficult to implement, my suggestion to the team is that the calculation system could result in a date, not only digits/numbers, such as currently.


* And if there's another easy way to do this, I'm sorry. I'm just a newbie. :oops:
User avatar
Marko
Posts: 1719
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Sep 3rd, ’22, 10:50

You should use Date and Time macro instead. You can apply the maths and date formats as you wish.
User avatar
marcelolima
Posts: 37
Joined: Apr 11th, ’22, 00:04

Post by marcelolima » Sep 4th, ’22, 13:40

Thanks for your help, Marko.
I checked your orientation.
As I understand it works only with the current date.

Would it be possible to insert a past date and, from this date, select the "shift" field?

Thank you again.
User avatar
Marko
Posts: 1719
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Sep 6th, ’22, 17:22

Ok, we will see if this could be implemented in one of the next versions.
User avatar
marcelolima
Posts: 37
Joined: Apr 11th, ’22, 00:04

Post by marcelolima » Sep 7th, ’22, 02:01

I would like to use it through FastKeys, but no need to waste energy in this case.

The functionality I mentioned can be used by the windows calculator itself.

https://support.microsoft.com/en-us/win ... 67004faa43

Thank you so much!
User avatar
Tom
Posts: 791
Joined: Nov 24th, ’15, 23:39

Post by Tom » Sep 9th, ’22, 08:54

You can use this script (Type: Command):

Code: Select all

Gui, Font, s10, Segoe UI
Gui, Add, MonthCal, vSelectedDate 
Gui, Add, Text,, Add days: 
Gui, Add, Edit
Gui, Add, UpDown, vAddDays Range1-60
Gui, Add, Button, Default gSelectDate, Select 
Gui, Show 
return 

SelectDate: 
Gui, Submit 
Date := SelectedDate 
Date += %AddDays%, days  
FormatTime, Date, %Date%, MM/dd/yyyy 
SendInput, % Date
return
User avatar
marcelolima
Posts: 37
Joined: Apr 11th, ’22, 00:04

Post by marcelolima » Sep 11th, ’22, 12:14

Thanks, Tom!

Exactly what I needed.

Best regards,

Marcelo.
Post Reply