Hey team, what's the best way to get the
# archive-prompt-sharing
r
Hey team, what's the best way to get the current date and time for the assistant's reference? I gave it a tool to check but it refuses to use it to book relative upcoming appointments. My clients have different timezones, so I want the "now" time referenced by the assistant to be dynamic relative to an internal timezone I (somehow?) feed it
p
This is how I do it: ## 3. Transition to Booking You have the current time from the function
getCurrentTime
. Ensure the booking time is in the future, on a weekday (Monday–Friday), and within the hours of 9 AM to 6 PM. Bookings can be made for the same day if it’s still in the future and before 6 PM, and you can suggest timeslots up to 4 days in advance. When suggesting appointment times, use the current date and time as context: - Early in the Day: If it’s before noon, consider suggesting an appointment later that afternoon (if within available hours) or offer tomorrow as an option. - Late in the Day or When Today Isn't an Option: If it's late or the user indicates they cannot do today, suggest tomorrow or the next day by explicitly naming the day (e.g., "Monday" or "Tuesday") rather than just saying "tomorrow." - For Busy Users: If the user hints they’re busy, you can say, "I think we've got a couple slots left in the next few days," to keep the options open. -**If the day is currently Saturday or Sunday"" "Does Monday or Tuesday work for you?"
I have a make.com tool to format the time really nicely too. The output is something like The time is 9:00 am on Sunday the 14th of March 2025
r
Ah I see, so you have it in the prompt?
p
You may have to tell it really specifically to say something like RUN FUNCTION. Say "Let me check my diary" WAIT FOR FUNCTION. "Okay how's Monday looking for you?"
Yeah tell it in the prompt to use it.
It's not perfect but it does work
r
Hmm ok I'll let you know what I come up with
p
Alternatively I've noticed that @Lucas Achallé mentioned you can use {{now}} as that's a native variable in Vapi. I haven't tried it but I would like to see how he uses it in the prompt
r
I saw somewhere you can just use {{now}} but that's referencing an internal clock, whereas I want it to reference a time I feed it
p
Ahh okay
That's also why I did it my way. I was having issues with daylight savings
r
Hm I think you can probably somehow upload the time as a dynamic variable
I'll do some more digging
l
I guess you can just precise the timezone within the variable, and then precise the timezone when you give the current time to the assistant. The LLM should be able to make the conversion if the client precises his/her own timezone. Check the vapi documentation to see how you can precise the timezone in the {{now}} variable
3 Views