https://retellai.com/?utm_source=discord&utm_medium=seo logo
How can I get Retell to compare 2 dates
# ❓・ai-evy-support
f
@AI Evy How can I get Retell to compare 2 dates
a
Thanks for tagging me @fakedane. I'll look through relevant sources and get back to you shortly.
### Answer Based on the available sources, there isn't specific documentation about comparing dates directly within Retell AI. However, I can provide some guidance based on the information available. For date-related functionality, you can pass date information as dynamic variables through the backend [(1) ]() . As mentioned in a community discussion, you can pass current date information as
retell_dynamic_variables
from the backend . In the Create Chat API, you can see how dynamic variables are structured [(2) ]() :
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const chatResponse = await client.chat.create({ agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD' }) ;
The response shows how
retell_llm_dynamic_variables
can be used to pass information like customer names, and you could similarly pass date information for comparison . For more specific guidance on implementing date comparison functionality, I'd recommend checking these resources: - [Create Chat API documentation]() - [Analytics Dashboard features](

▾

) Would you like me to provide a general approach for handling date comparisons in conversational AI systems?
​ To learn more, see the sources I considered: [[1] Date / Weekday unclear](https://discord.com/channels/1186424376300679209/1262367636080164905) [[2] Create Chat](https://docs.retellai.com/api-references/create-chat) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
f
@AI Evy I'm in healthcare -- trying to get Retell's Voice agent to verify patient's date of birth. It keeps accepting incorrect dates.
a
Thanks for the follow-up, @fakedane. I'll get back to you soon.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
### Answer For date of birth verification in healthcare, you can use dynamic variables to improve accuracy [(1) ]() . You can pass the correct date of birth as a dynamic variable in the
retell_llm_dynamic_variables
field . Here's how to structure this in your agent configuration:
Copy code
javascript
{
 "retell_llm_dynamic_variables": {
 "patient_dob": "March 15, 1985"
 }
}
You can then reference this in your prompt using the
{{patient_dob}}
syntax . For example, in your agent's prompt, you could include: "Please verify that the patient's date of birth matches {{patient_dob}}" . Dynamic variables work in prompts, begin messages, and tool configurations . The system automatically provides current time variables like
{{current_time}}
which shows the current time in America/Los_Angeles timezone . For healthcare applications specifically, Retell AI supports patient intake by capturing insurance info, verifying eligibility, and routing calls to clinical or billing departments based on need [(2) ]() . The platform is designed with compliance in mind for regulated industries like healthcare . To improve verification accuracy, consider: - Using the exact date format in your dynamic variables [(1) ]() - Including specific validation instructions in your agent's prompt - Setting up custom analysis to track verification success rates [(3) ]() For more complex date validation logic, you might need to implement custom functions that can be called by the agent during the conversation.
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] 2025 B2B Guide to AI Phone Calls & Voice Agents | Retell AI | Retell AI](https://www.retellai.com/blog/b2b-guide-to-ai-phone-calls) [[3] Create Chat](https://docs.retellai.com/api-references/create-chat) ​