Hi All,
I'm getting started with the GenesysCloud API and using the
POST/api/v2/analytics/conversations/details/query
However, the format of the response sometimes varies. Sometimes it is yyyy-MM-ddTHH:mm:ssZ but mostly in the response I have the format yyyy-MM-ddTHH:mm:ss.SSSZ
How can I force request to have date-time format like yyyy-MM-ddTHH:mm:ss:SSSZ in each response ?
You have no control over anything that doesn't have an explicitly listed parameter to control it documented in the API.
If you're seeing that inconsistency within different instances of the same field you should open a customer care case to discuss it, their may be a rogue node behaving differently or something in their infrastructure and only they'd be able to track that down.
If you're seeing the inconsistency across different fields those fields may lack the degree of specificity to include microseconds and you could suggest an idea in their AHA portal to get that added precision if it's feasible and gets attention.
To add to the above response - both of those formats are formatted as valid ISO-8601 date strings (milliseconds are optional in the standard). Most date/time libraries should have a way to parse the data with or without the millisecond component. I'm not sure which language or library you're working with but if you search for "how to parse an ISO-8601 date string with " you should be able to find something that will suit your needs.