Current Date and Time Error
# support
i
When I asked the assistant for the current date, it returned a date from the year 2023. As a result, all appointments were scheduled in the past (2023), which is outdated. Today’s date is 23/06/2025. I’ve already tried adding the current year and month in the prompt, but that solution doesn’t work reliably over time.
k
To ensure your assistant always identifies the current date and doesn't revert to a past year, you can use Vapi's dynamic variables effectively. Include these in your assistant's prompts or system messages: - Use
{{now}}
for the full current date and time. - Use
{{"now" | date: "%Y"}}
for the current year. - Use
{{"now" | date: "%m"}}
for the current month. - Utilize LiquidJS syntax for precise formatting and timezone adjustments, for example:
{{"now" | date: "%A, %B %d, %Y, %I:%M %p", "America/New_York"}}
. Make sure you have these variables set up in your prompts to directly reflect the correct date and align with time zones. This should help to maintain the accuracy of your assistant's date recognition over time. For further configuration, you can refer to the updated functionalities in [this documentation](https://docs.vapi.ai/changelog/2025/3/23). If you're still encountering issues, consider reviewing any conditional logic or scripts that might be affecting date calculations within the assistant..