Legacy Dev Forum Posts

 View Only

Sign Up

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

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

    Posted 06-05-2025 19:15

    Neil_Jones | 2023-06-13 10:41:43 UTC | #1

    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


    Anton_Vroon | 2023-06-15 01:33:08 UTC | #2

    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)) )


    Neil_Jones | 2023-06-21 10:26:29 UTC | #3

    Hi Anton,

    Thank you that has worked perfectly.

    Neil


    system | 2023-07-22 10:27:14 UTC | #4

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


    This post was migrated from the old Developer Forum.

    ref: 20404