Appointment Date User Prompt Variable

Hi!

I've been having some trouble getting this to work, so I figured I'd ask. I'd like to have it so that when I am sending out an appointment email, I just have to input a person's name and appointment day into a prompt, formatted like so:

Monday, January 1st (1/1)

Right now, I can only get KM to output the current date in various formats, or output a variable based on an amount of time before/after the current date.

I was also wondering if there was a script where I could take an appointment day, and create a new variable of 2-3 days before the appointment. Would there also be a way to create this variable in a way that would exclude weekends/only count Mon-Fri?

Is this something KM can even do? Any help would be appreciated!

Yes, it can definitely be done.

Given the appointment date in variables Day, Month and Year, you can do something like:

The calculation is:

DOW(TIME(Year,Month,Day,12,0,0))=1 OR DOW(TIME(Year,Month,Day,12,0,0))=7

and the display is:

%ICUDateTimeFor%TIME(Year,Month,Day,12,0,0)%MMM d, yyyy%

Note that Keyboard Maestro’s TIME function does not care if the day goes negative. The 0th or March is the last day of February, similarly the 32nd of March is April 1.

1 Like

Thank you so much!!

1 Like