Data Action to gather current day (use with conversation query API)

Hi,

I've built a API which retieves active callbacks based on the 'callback number', using (api/v2/analytics/conversations/details/query) - which the 'interval' is a required field.

I'm only interested in callbacks for the currenty day (example - 2023-06-12T00:00:00.000Z/2023-06-12T23:59:00.000Z) so needing to build an 'update data' action (variable) that can then be used against the API request.

Can this be acheived with a single expression, using the 'date/time' statement and if so is it correct to use the 'makeDateTime' function along with year, month, day, hour, minute and second

Thanks, Neil Jones

Something like this should do, you would need to adjust for daylight savings or any other timezone differences from UTC

Append(
ToString(MakeDateTime(Year(Flow.StartDateTimeUtc), Month(Flow.StartDateTimeUtc), Day(Flow.StartDateTimeUtc), 0, 0, 0)),
"/",
ToString(MakeDateTime(Year(Flow.StartDateTimeUtc), Month(Flow.StartDateTimeUtc), Day(Flow.StartDateTimeUtc), 23, 59, 00))
)

Hi Anton,

Thank you that has worked perfectly.

Neil

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.