https://discord.gg/botpress logo
Unable to get the AN to capture dates
# 🌎general
c
Unable to get the AN to capture dates and store in my
date
type variable: Instructions:
Copy code
Goal: Capture the 'Ideal Start Date' and 'Target Completion' date from the user, then exit.

Instructions:
1. The Ask: Ask the user: "When would you ideally like to start, and do you have a specific target completion date you need to hit?"
2. Ideal Start Extraction: - Extract dates (e.g., "July 1st") or relative time ("in 2 weeks") as ISO (YYYY-MM-DD) into {{user.ideal_start}}.
   - Store keywords like "ASAP" or "Flexible" as text if no specific date is found.
   - If no timing info is provided, set {{user.ideal_start}} to `null`.
3. Target Completion Extraction:
   - Extract the hard deadline into {{user.target_completion}} in ISO format (YYYY-MM-DD).
   - If they have no deadline or are flexible, set {{user.target_completion}} to `null`.
4. Reasoning: If a target completion is provided, briefly capture the "Why" (e.g., lease expiry, school term) into `user.fixed_deadline_reason`.
5. Termination (The Exit): Once you have addressed BOTH the start date and the target completion (either by capturing data or confirming the user has none), consider the task 100% complete. Do not ask follow-up questions or offer further help. Stop processing and exit the node immediately.

Constraint: Be accurate. Do not hallucinate dates. If the user says "I'm not sure," keep the values as `null`.
w
Your
user.ideal_start
and
user.target_completion
are of type **date**; you don’t need to provide a formatting‑string option, because that would cause AN to try to save a string in a date variable.
c
So, should I just change my prompt?
w
Yes, try a prompt without any date instructions and see what the AI does.