BESSER-Bot-Framework icon indicating copy to clipboard operation
BESSER-Bot-Framework copied to clipboard

Extraction of date and time values from a datetime entity

Open ivan-alfonso opened this issue 10 months ago • 0 comments

I didn't find an easy way to get only the date or the time from a datetime entity. If I get the value of the parameter:

date = predicted_intent.get_parameter('date').value

I will receive a string containing the complete datetime: 2023-09-14T00:00:00+02:00

One possible solution is to add two methods (e.g., time_value and date_value) to extract the specific time and date, Alternatively, two additional entities, date and time, could be provided separately.

ivan-alfonso avatar Mar 06 '25 10:03 ivan-alfonso