accurate date and time
# prompt-tip
m
Hi, is there a recommended way in Vapi to reliably resolve relative dates like “tomorrow” or “next Tuesday” based on the current date? Should this be handled in the prompt or externally via tools/webhooks?
r
For reliable handling of relative dates like “tomorrow” or “next Tuesday,” the recommended approach is to resolve dates externally via tools or webhooks, not purely in the prompt. You can use Vapi’s built‑in dynamic date variables (like {{now}} or {{date}}) to anchor context in the prompt, but the actual interpretation of relative dates is still done by the model and is not deterministic. Please refer to: https://docs.vapi.ai/assistants/dynamic-variables
s
if LLM knows the current time, that should not be an issue find a way to give current time to LLM, one approach is by tool and there r other ways to this
m
i also work with make (automations) so i can add it there, create a tool next after webhook module?
s
yes, that should solve issue @Mručo let me know how it goes
m
Okay g, i have also problem with schedule function, when i want to book some date and time whitch is booked, instead of slot selection ai vapi choose schedule the date and time whitch is booked (make sends json to vapi telling there is not availble spot so there is 2 option, instead of reading slot selection ai says its sucesfully booked
g
I’ve gone through so many variations of prompt and I havnt gotten anything to work when saying a day/ date in the future, it keeps getting them wrong. I have used all the variables etc but to no avail. Is this what you are saying?: if someone asks about a date or a day, get a tool to call LlM first to get the day/ date and come back to vapi with this? I just cannot find the solution for just within vapi. If it is a tool thing, how do I format the tool within vapi to get the right date exactly?
s
happy to help to get exact date and time @Glad.ie @Mručo before next step tell me do u use GPT-mini?
g
using 4.1 at present, but just having issues going from user to vapi with regards dates, and vapi understanding the dates. ive used a tool to try look up the google calendar in my n8n to get definate date but was and then wasnt working, brought it abck to basics but still lost in trying to understand the way to do it right once and for all!
r
Hi, Pass ISO 8601 dates through the system. Never pass natural language like “next Tuesday” into n8n or Google. In your assistant, clearly instruct it to: • Always convert dates to ISO 8601 (YYYY-MM-DDTHH:MM:SS) • Use the current date/time as reference • Assume a fixed timezone • Confirm the interpreted date with the user before booking Example: “Next Tuesday at 2pm” → 2026-02-17T14:00:00 Then pass that exact ISO value into n8n and Google Calendar (including timezone). Example system prompt you can use: You are a scheduling assistant. When a user mentions a date or time: • Always convert it to ISO 8601 format (YYYY-MM-DDTHH:MM:SS) • Use the current date/time as reference: {{now}} • Assume timezone: Europe/London • Default appointment length: 30 minutes Before booking: 1. Confirm the exact interpreted date and time with the user. 2. Then send the ISO startDateTime and endDateTime to the calendar tool. Most issues happen due to: • Missing timezone • Date and time extracted separately • n8n reformatting the value