https://retellai.com/?utm_source=discord&utm_medium=seo logo
how do i get the systems current date only not tim...
# ❓・ai-evy-support
a
Thanks for tagging me @gk. I'll look through relevant sources and get back to you shortly.
### Answer --- Retell AI provides the
{{current_time}}
system variable, which returns the current time in
America/Los_Angeles
timezone in the format "Thursday, March 28, 2024 at 11:46:04 PM PST" [(1) ]() . You can also use
{{current_time_[timezone]}}
to get the current time in a specific timezone [(1) ]() [(2) ]() . However, these variables include both date and time. To extract just the date portion, you have a few options: Option 1: Use the Extract Dynamic Variables tool You can create an Extract Dynamic Variables function to parse the date from
{{current_time}}
[(3) ]() . Set up a variable with type "Text" and instruct your agent to extract only the date portion . Option 2: Prompt engineering In your prompt, you can instruct the agent to only mention the date portion when referencing
{{current_time}}
. For example: "When discussing today's date, only mention the day, month, and year from {{current_time}}, not the time" [(4) ]() . Option 3: Use a custom function Some users handle date parsing through custom Lambda functions or webhooks to get the current date in their preferred format [(5) ]() . The
{{current_time}}
variable is automatically available as a system default variable, so no configuration is required to use it [(1) ]() [(2) ]() .
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Simulation Testing Now Live for All Agents](https://www.retellai.com/changelog/simulation-testing-now-live-for-all-agents-c27zh) [[3] Extract Dynamic Variables](https://docs.retellai.com/build/single-multi-prompt/extract-dv) [[4] Discord message from @mattybgoood on 2025-01-07](https://discord.com/channels/1186424376300679209/1186462578310910112/1326312718558298233) [[5] Function to get date without having to use Cal.com ?](https://discord.com/channels/1186424376300679209/1293870288819196031) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.