https://retellai.com/?utm_source=discord&utm_medium=seo logo
how to get the current date in the chat summary
# ❓・ai-evy-support
p
@AI Evy how to get the current date in the chat summary. I am trying to get this using {{current_time}}, but i am not getting anything.
a
Thanks for tagging me @poison_br09. I'll look through relevant sources and get back to you shortly.
### Answer --- Based on the documentation,
{{current_time}}
is a system default variable that can be used in dynamic variables [(1) ]() . However, the chat summary is generated during post-call analysis and is not a place where you can directly inject dynamic variables [(2) ]() [(3) ]() . The
chat_summary
field is part of the
chat_analysis
object, which contains information like sentiment, status, and summary generated after the chat ends [(2) ]() . Dynamic variables work in prompts, begin messages, tool configurations, call handling, and webhook URLs [(1) ]() , but the chat summary itself is an AI-generated text field based on the conversation transcript [(2) ]() [(3) ]() . If you need the current date/time to appear in your chat interactions or to be referenced by the agent during the conversation, you should use
{{current_time}}
in your agent's prompts or begin message [(1) ]() . For timezone-specific time, you can use the format
{{current_time_America/Los_Angeles}}
. If you're experiencing issues where
{{current_time}}
isn't populating correctly, some community members have reported similar problems [(4) ]() [(5) ]() [(6) ]() . As a workaround, you could pass your own date/time as a custom dynamic variable in the `retell_llm
_dynamic_variables` field when creating the chat [(1) ]() [(3) ]() . **
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Appreciate the feedback! Feel free to ask me again with additional guidance or context.
p
@User {{current_time}} is not working as dynamic variable.
a
Thanks for the follow-up, @poison_br09. I'll get back to you soon.
p
Hii @AI Evy I am waiting for your response.
a
### Answer --- Based on the documentation,
{{current_time}}
is a system default variable that should work automatically without configuration [(1) ]() . The current time is provided in
America/Los_Angeles
timezone by default . Where
{{current_time}}
works:
- Agent prompts - Begin message - Tool configurations (URLs, descriptions, property descriptions) - Call handling (voicemail prompts, transfer instructions) - Webhook URLs Where it does NOT work:
{{current_time}}
cannot be used directly in the chat summary [(1) ]() [(2) ]() [(3) ]() . The chat summary is AI-generated text created during post-call analysis [(2) ]() [(3) ]() . Troubleshooting steps: 1. Verify placement - Ensure you're using
{{current_time}}
in a supported location (like your agent prompt or begin message) [(1) ]() 2. Check for timezone-specific format - If you need a different timezone, use
{{current_time_[timezone]}}
. For example:
{{current_time_Australia/Sydney}}
3. Note about spaces - Spaces around the variable name are trimmed when evaluating 4. Workaround for chat summary - If you need the date/time to appear in analysis, reference it in your agent's prompt so the AI naturally includes it in conversation, which will then be reflected in the generated summary [(1) ]() [(2) ]() 5. Custom dynamic variable alternative - You can pass your own date/time as a custom dynamic variable in `retell_
llm_dynamic_variables` when creating the chat If
{{current_time}}
still isn't populating, there have been community reports of similar issues [(4) ]() [(5) ]() . I'd recommend testing in a simple agent prompt first to isolate whether it's a configuration issue. **
p
@AI Evy and where i can get the output if i am using in the prompt?
a
Thanks for the follow-up, @poison_br09. I'll get back to you soon.
### Answer When you use
{{current_time}}
in your agent's prompt, the output appears in the agent's spoken responses during the conversation [(1) ]() . The dynamic variable gets replaced with the actual current time when the agent processes the prompt, and the agent will naturally reference that time information in its replies to the user . For example, if your prompt includes: "You are a helpful assistant. The current time is {{current_time}}. Use this information when scheduling appointments." The agent will have access to the actual current time (e.g., "Thursday, March 28, 2024 at 11:46:04 PM PST") and can reference it in conversation . Where you'll see the output: 1. Live conversation - The agent will speak responses that include time references based on the populated variable 2. Transcript - After the chat ends, you can retrieve the transcript via the API, which will show what the agent actually said [(2) ]() 3. Message history - The
message_with_tool_calls
array in the chat response will contain the agent's messages The dynamic variable itself won't appear as "{{current_time}}" in the output - it gets replaced with the actual time value before the agent generates responses [(1) ]() .
p
if i want to extract these output data to the my own db, how i can do that?
a
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] List Chat](https://docs.retellai.com/api-references/list-chat) ​
p
@AI Evy if i want to extract these output data to the my own db, how i can do that?
a
Thanks for the follow-up, @poison_br09. I'll get back to you soon.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
3. Custom Function Integration For real-time data extraction during the conversation, you can create a custom function that sends data directly to your database [(4) ]() . Steps: - Add a custom function in the dashboard - Configure your database endpoint URL - Set the HTTP method (GET, POST, PATCH, PUT, DELETE) - Define parameters using JSON schema format When the LLM calls this function, Retell sends a POST request to your specified URL with the function name and parameters . The most common approach is to use the Get Call API to retrieve the complete chat data after the conversation ends, then parse and store the relevant fields in your database [(2) ]() .
### Answer --- To extract chat data (including information like
{{current_time}}
used in conversations) to your own database, you have two primary methods: 1. Extract Dynamic Variables Tool You can use the Extract Dynamic Variables tool to capture specific information from user responses and save them as dynamic variables [(1) ]() . These variables can then be accessed programmatically. Steps: - Add an Extract Dynamic Variable Tool to your agent - Define variables with names, descriptions, and types (Text, Number, Enum, or Boolean) - These extracted values become available in the
collected_dynamic_variables
object after the call ends [(2) ]() [(3) ]() 2. Retrieve Chat Data via API After a chat ends, you can retrieve the complete chat data using the Get Call API and store it in your database [(2) ]() . The API response includes: -
transcript
- Full conversation text -
transcript_object
- Structured transcript with timestamps -
collected_dynamic_variables
- Variables extracted during the conversation -
call_analysis
- Post-call analysis including summary, sentiment, and custom analysis data Example API call structure:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const callResponse = await client.call.retrieve('119c3f8e47135a29e65947eeb34cf12d') ;
console.log(callResponse) ;
​ To learn more, see the sources I considered: [[1] Extract Dynamic Variables](https://docs.retellai.com/build/single-multi-prompt/extract-dv) [[2] Get Call](https://docs.retellai.com/api-references/get-call) [[3] Register Phone Call](https://docs.retellai.com/api-references/register-phone-call) [[4] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
Hii @AI Evy , {{current_time}} is able to give me the current date, but it is returing the wrong year.
a
Thanks for the follow-up, @poison_br09. I'll get back to you soon.
### Answer The
{{current_time}}
system default dynamic variable provides the current time in
America/Los_Angeles
timezone by default [(1) ]() [(2) ]() [(3) ]() . The format includes the day, date, and time (e.g., "Monday, March 24, 2025 at 02:53:01 PM PDT") [(2) ]() . If you're seeing an incorrect year, this could be due to: 1. Timezone-specific formatting - Try using the timezone-specific format
{{current_time_[timezone]}}
to ensure you're getting the correct time for your region [(1) ]() [(2) ]() [(3) ]() . For example: -
{{current_time_America/New_York}}
[(1) ]() [(2) ]() -
{{current_time_Australia/Sydney}}
2. Variable evaluation - The variable gets evaluated when the agent processes it [(1) ]() . Make sure you're checking the output at the right point in the conversation flow. 3. Custom dynamic variable workaround - If the system variable continues to return incorrect data, you can pass your own date/time as a custom dynamic variable in the
retell_llm_dynamic_variables
field when creating the chat or call [(1) ]() [(4) ](

▾

) . The documentation confirms that
{{current_time}}
works in prompts, begin messages, tool configurations, call handling, and
webhook URLs [(1) ]() [(2) ]() . Spaces around the variable name are trimmed when evaluating [(1) ]() . If the issue persists after trying these approaches, I'd recommend: - Visit [Contact Sales]() - Visit [)
​ 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] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) [[4] Live Workshop: Retell x GoHighLevel Integration](

https://www.youtube.com/watch?v=TlzrfYgiPLQ▾

) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy I can't use option 3 everytime right... and i am using the default timezone.
a
Thanks for the follow-up, @poison_br09. I'll get back to you soon.
### Answer You're correct that passing a custom dynamic variable every time isn't ideal [(1) ]() . The
{{current_time}}
system variable should work automatically without configuration . Since you're experiencing an incorrect year with the default
{{current_time}}
variable (which uses
America/Los_Angeles
timezone) , and this appears to be a bug rather than a configuration issue, you should report this to the Retell team. Based on community reports, there have been similar issues with
{{current_time}}
not working correctly [(2) ]() [(3) ]() . One community member noted that even without the dynamic variable, the timezone should be current LA timezone, but was seeing incorrect dates like October 2023 [(2) ]() . To report this issue: - Visit [Contact Sales]() - Visit [) In the meantime, you could try using the timezone-specific format
{{current_time_America/Los_Angeles}}
to see if that resolves the incorrect year issue [(1) ]() . This explicitly specifies the timezone rather than relying on the default.
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] How can I set the current time in the agent](https://discord.com/channels/1186424376300679209/1370089305606848653) [[3] Discord message from @zz4chy on 2025-03-08](https://discord.com/channels/1186424376300679209/1294891368505937952/1347968047993848002) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@User @Colin - Integrations @ Retell AI @Omar Ashraf | Community Lead
a
Thanks for the follow-up, @poison_br09. I'll get back to you soon.
### Answer Based on the conversation thread, you're experiencing an issue where
{{current_time}}
is returning the wrong year [(1) ]() . This is a known issue that has been reported by multiple community members [(2) ]() [(3) ]() . The
{{current_time}}
system default variable should automatically provide the current time in
America/Los_Angeles
timezone [(1) ]() [(4) ]() , but there have been reports of it behaving inconsistently [(2) ]() or returning past dates [(3) ]() . What you can try: 1. **Use the explicit timezone format**: Try
{{current_time_America/Los_Angeles}}
instead of just
{{current_time}}
[(1) ]() . This explicitly specifies the timezone rather than relying on the default. 2. **Test with a different timezone**: Try
{{current_time_Europe/London}}
or another timezone to see if the issue is specific to the default timezone [(2) ]() . 3. **Publish your agent**: One community report suggested publishing the agent and testing again [(3) ]() . Since this appears to be a platform issue rather than a configuration problem on your end, and multiple users have reported similar problems [(2) ]() [(3) ]() , I recommend: - Visit [C
ontact Sales]() - Visit [) The Retell support team should be able to investigate why the system default variable is returning incorrect year information.
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] {{current_time_[timezone]}} not working as it should](https://discord.com/channels/1186424376300679209/1440290767170965685) [[3] Issue with current date](https://discord.com/channels/1186424376300679209/1432663702485864448) [[4] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Appreciate the feedback! Feel free to ask me again with additional guidance or context.