cube icon indicating copy to clipboard operation
cube copied to clipboard

Date Format Inconsistency Between Cube API and UI

Open Zawar92 opened this issue 5 months ago • 2 comments

Problem

Issue: Date Format Inconsistency Between Cube API and UI When I query Cube using month granularity for dates, I’m seeing different formats between the API response and the Cube UI: • In Cube UI: Dates are displayed in a user-friendly format like “2025 Jun” • In API Response: The same dates appear as ISO timestamps like

{"date": “2025-06-01T00:00:00.000",
       "date.month": "2025-06-01T00:00:00.000"}

I’m looking for a simple parameter I can include in my API requests that would return the date in the same format as shown in the Cube UI (“2025 Jun”), without having to:

  1. Create custom dimensions in my data model
  2. Write post-processing code in my application Is there any built-in query parameter or configuration option that would make the API return dates in the same human-readable format that the Cube UI uses?

Is this solution even possible, or is there a workaround for it? Any suggestions would be helpful.

Zawar92 avatar Sep 29 '25 17:09 Zawar92

I’m looking for a simple parameter I can include in my API requests that would return the date in the same format as shown in the Cube UI (“2025 Jun”)

Such a parameter does not exist.

The recommended solution is indeed to format dates as you see fit. With some libraries, it might take just a couple of lines of code on the front-end.

Why is that the best solution: only you know how the dates should be formatted in your app. Baking this into Cube will probably make it too hard to customize when needed.

I hope this helps.

igorlukanin avatar Sep 30 '25 10:09 igorlukanin

@igorlukanin, Thanks for the information.

Zawar92 avatar Oct 01 '25 13:10 Zawar92