Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Data type DateTime doesn't work with Post Dataset API method

Hi,

 

 I'm currently trying to post a push dataset using the API. It works fine with strings and integers but when I set a column data type to DateTime I'm not sure if it works. The post request sends without issue but when I create a report on the dataset the date field doesn't have the calender icon it usually has next to date fields and there is no date hierarchy.

 

 I'm not sure whether there is something else I have to send to the API, something I'm doing wrong or whether it's just not possible but any help would be appreciated.

 

Thanks

6 Replies

  • You need to send the datetime columns to the push dataset API in ISO8601 format.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for your response but I have tried that and it hasn't worked. It is recognising that it is a DateTime as it formats it (e.g. 08/09/19 08:00:00), but I still can't use the date hierarchy. 

  • That is not ISO8601 format.  I am formatting my datetime values in 8601 and have no problems pushing rows into the streaming dataset.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Sorry what I was saying was I am formatting my datetime values in ISO8601 (yyyy-MM-ddTHH:mm:ssZ) and pushing them into the dataset but then when I create a report on the dataset and look at the data as a table it formats it as dd/MM/yy HH:mm:ss. So therefore, power bi must recognise that the input data is a datetime or why else would it format it.

      • Anonymous's avatar
        Anonymous
        Not applicable

        HI Anonymous,

        I think it may be related to power bi not add any verify of these posted data so that it only recognizes the default format of datetime values.

        Perhaps you can submit an idea to add more DateTime format supports.

        Regards,

        Xiaoxin Shneg