Assistant gets the date wrong constantly
# support
t
I'm using an assistant for a number of things, including scheduling sales meetings. It requires an accurate sense of the date/time. I have applied the current date, time, and day as follows for the assistant: Current date: {{ "now" | date: "%B %d, %Y", "America/New_York" }} Current time: {{ "now" | date: "%I:%M %p", "America/New_York" }} Current day: {{ "now" | date: "%A", "America/New_York" }} However, the assistant is very frequently thinking it's the right date but wrong day of week, the right date and day of week but wrong time, or the right "month and day of month" but wrong year. Calls with these issues in them include: 019a003e-c3f8-7eec-adf8-527c351f263a and 019a0042-fa9d-7aac-8ab1-0c611c075c8b
c
Hi there, Thank you for your message. Our team is currently out of the office. We operate Monday through Friday, from 9:00 AM to 8:00 PM Pacific Standard Time (PST). We’ll get back to you as soon as possible during our normal business hours. If your message is urgent, please mark it accordingly or include “URGENT” in the subject line, and we’ll do our best to respond promptly. Warm regards, Vapi Customer Support Team
v
Suggestion: Update your system prompt to explicitly instruct the assistant to always use the provided date, time, and day variables for all scheduling and time-related responses. For example:
Copy code
[System Prompt Addition]
Always use these variables for all date/time references:
- Current date: {{ "now" | date: "%B %d, %Y", "America/New_York" }}
- Current time: {{ "now" | date: "%I:%M %p", "America/New_York" }}
- Current day: {{ "now" | date: "%A", "America/New_York" }}
Never infer or guess the date, time, or day from your own knowledge—only use the above values.
This should help ensure the assistant relies on the correct, injected values rather than its own model data for date/time accuracy. Test this change and review your call logs to confirm improved behavior ([Debugging voice agents](https://docs.vapi.ai/debugging)). Source: - [Debugging voice agents](https://docs.vapi.ai/debugging)
g
@theschnack use this particular instruction, its surely going to work out..
t
Ah crap; I may as well add that last line (never infer, guess, pretend...) to every block in every prompt. (I kid, I kid. Thanks)
g
@theschnack Then figure the shit out on your own, guess you know it all..
t
No offense -- I was joking (lamely or not).
v
Message marked as helpful by @theschnack! 🎉
g
@theschnack I’m not joking.. Hence, try that out to see if it works.. Are you making use of a tool/automation alongside??
c
Please insert this code snippet anywhere into your assistant prompt to provide correct date and times. Modify the timezone as needed:
Copy code
The current date and time is {{"now" | date: "%A, %B %d, %Y, %I:%M %p", "America/Los_Angeles"}}

Do not use startTime and endTimes that are older than {{ "now" | date: "%s" | times: 1000 | tz: "America/Los_Angeles" }}
More information on this can be found on the documentation: You don't have to use the EPOCH conversion for the last line, but I found that it helps in certain cases
2 Views