I want to display the @sys.date in the text response of an intent in this order dd/mm/yyyy, however when using $intent.params.date.resolved Dialogflow automatically gives it back in the inverse order yyyy/mm/dd.
2 Answers
You can utilize the System Function FORMAT_DATE to represent a date / time using a specified format. For your case, the function would be $sys.func.FORMAT_DATE($intent.params.date.resolved, "dd/MM/yy")
.
You can apply inline system functions in your agent's conditions, static response messages (such as text responses, custom payloads, and conditional responses), and parameter presets.

- 208
- 1
- 4
The .resolved
version of the entity won't give you access to the entity's smaller parts: it is only useful for map entities in order to clearly disambiguate between what the user said and what the bot interpreted.
If the entity you're using is the sys.date one you can however access the parts of the date via dot notation.
So for example you could respond to a user asking
"When will this be available?"
with
"The item will be available on the
$session.params.date.day
of$session.params.date.month
(year$session.params.date.year
)."
These references will be resolved to the part of the date you selected. Also, you can specify your own composite entity for different objects (a user for example, who has a name, a surname and a DOB).

- 640
- 7
- 17