Salesforce Insights in 5 Minutes·Issue #196·For AI enthusiasts
How to Handle Date Time in Salesforce Agentforce?
Date time is a classic headache for Agentforce agents. The fix needs three things: the agent must know the user's time zone, grab the date without asking for it directly, and send a clear, unambiguous value to the action saving the record. Miss one, and a 3 PM meeting ends up saved at 11 AM. The tricky part - users say "tomorrow at 3 PM," but Salesforce stores everything in UTC, with an LLM stuck in between. Without guardrails, the agent might ask "which time zone?" or send a broken value to your Flow. This post shows a real working Agentforce Employee Agent (built in Agent Script) that creates Events correctly - using user profile context, smart reasoning instructions, and the lightning__dateTimeStringType input. Full code included, with tips at the end.
The site uses the cookies it needs to work, such as your sign-in. With your consent it also uses
Google Analytics, to count visits, and Google AdSense, whose ads fund the
extension: both set their own cookies and send your address to Google. Neither runs until you choose, and you
can change your mind at any time from Cookie settings at the foot of every page.
Which cookies, and why.