https://retellai.com/?utm_source=discord&utm_medium=seo logo
i am using {{current_time_America/New_York}} so my...
# ❓・ai-evy-support
r
@AI Evy i am using {{current_time_America/New_York}} so my agent is aware of time context, yet when i am going through the process of booking an appointment and i mention the date "march 4th", my agent extracts the date as "2024-03-04" rather than "2026-03-04". how can i fix that
a
Thanks for tagging me @raghad. I'll look through relevant sources and get back to you shortly.
### Answer --- This is a known challenge with LLM-based agents handling relative dates. Even with
{{current_time_America/New_York}}
injected, agents can sometimes misinterpret the year when users provide dates without specifying the year. [(1) ]() Recommended fixes: 1. Explicitly instruct the agent about date interpretation in your prompt. Add something like: - "The current date and time is:
{{current_time_America/New_York}}
. When a user mentions a date without a year, always assume they mean the nearest future occurrence of that date." [(2) ]() 2. Convert and validate dates before API calls. One community member shared a prompt approach that works well for date handling: - "Convert today's date:
{{current_time}}
to [your timezone] before making the request to ensure the requested time is not in the past." 3. Use the
{{current_calendar}}
variable
to give the agent a 14-day calendar context, which can help it understand upcoming dates better. [(1) ]() Why this happens: LLMs are generally "very bad with dates" when dealing with relative references like "next weekend" or dates without years. [(2) ]() When users say "March 4th" without the year, the model may default to a past or incorrect year. Prompt hardening tip: Be explicit in your instructions—specify that the agent should always interpret ambiguous dates as future dates relative to
{{current_time_America/New_York}}
. ---
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Discord message from @melvinglenford on 2025-03-06](https://discord.com/channels/1186424376300679209/1186462578310910112/1347206753783250995) ​