Exporting analytics data to CSV via API returns date fields in wrong format

We’re exporting process analytics data to CSV using the Analytics API in Creatio 8.4, but date fields are coming through in ISO format (2025-03-15T10:23:00Z) instead of our regional format (DD/MM/YYYY). This is causing issues for business users who need to open these reports directly in Excel.

Here’s our current API call:


GET /0/ServiceModel/ProcessAnalyticsService.svc/GetProcessData
Headers: FormatSettings: {"Culture": "en-GB"}

The response includes dates but ignores our culture settings. We need the CSV export to respect regional date formatting so users don’t have to manually convert thousands of rows. Has anyone successfully customized date format handling in Analytics API exports?

The FormatSettings header typically works for display in the UI, but CSV exports through the API often bypass those settings. One approach is to use a custom web service that wraps the analytics data retrieval and formats dates before generating the CSV. It adds a layer but gives you full control over formatting. You could also look into using the OData endpoint with $format parameter, though I’m not sure if that supports culture-specific formatting either.

I encountered something similar last year. The Analytics API doesn’t directly support format customization in the export endpoint. We ended up doing post-processing on the client side, but that’s not ideal for large datasets. Have you checked if there’s a way to configure default culture settings at the system level?

I’ve worked with the Process Analytics module extensively. The API uses JSON serialization that defaults to ISO 8601 for dates regardless of culture headers. For CSV exports specifically, you need to either transform the data post-retrieval or create a custom configuration service that intercepts the export process. The latter requires modifying the ProcessAnalyticsService configuration schema. Not straightforward, but it’s the only way to get native format support in the export pipeline.

I’ve implemented a comprehensive solution for this exact scenario. The key is understanding that CSV export customization requires intervention at three levels: API response formatting, regional settings handling, and date format conversion.

Solution Architecture:

First, create a custom configuration service that extends ProcessAnalyticsService:


[ServiceContract]
public class CustomAnalyticsService : BaseService {
    [OperationContract]
    public Stream GetFormattedProcessData(string culture) {
        // Implementation
    }
}

CSV Export Customization: The standard Analytics API doesn’t support culture-aware CSV formatting natively. You need to implement a custom export handler that:

  1. Retrieves data using EntitySchemaQuery against SysProcessLog and related entities
  2. Applies CultureInfo formatting to DateTime fields before CSV serialization
  3. Uses CsvHelper or similar library with configured DateTimeConverter

Regional Settings Handling: Configure the service to read culture from request headers:


var culture = new CultureInfo(requestCulture);
var dateFormat = culture.DateTimeFormat.ShortDatePattern;

Then apply this format during CSV generation. Register the custom service in your workspace and configure it to handle /CustomAnalytics/Export endpoint.

Date Format Conversion: For the actual conversion, create a custom TypeConverter:


public class CustomDateConverter : DefaultTypeConverter {
    public override string ConvertToString(object value, IWriterRow row, MemberMapData memberMapData) {
        if (value is DateTime dateTime) {
            return dateTime.ToString("dd/MM/yyyy", CultureInfo.CurrentCulture);
        }
        return base.ConvertToString(value, row, memberMapData);
    }
}

Register this converter in your CsvWriter configuration before generating the export.

Alternative Lightweight Approach: If modifying the service layer is too complex, implement a middleware API that:

  1. Calls the standard Analytics API
  2. Parses the JSON response
  3. Transforms date fields using the requested culture
  4. Generates CSV with proper formatting

This keeps your Creatio instance unchanged while providing the required functionality. The middleware can be a simple Node.js or .NET Core service that sits between your client application and Creatio.

Both approaches ensure dates appear in DD/MM/YYYY format (or any culture-specific format) in the final CSV, making reports immediately usable for business users without manual conversion.