Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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 6
lbendlin
Super User
Super User

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

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.

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
v-shex-msft
Community Support
Community Support

HI @Anonymous,

Can you please share some more detailed information about your operations steps?

How to Get Your Question Answered Quickly 

Notice: please not attach sensitive data in your sample.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
lbendlin
Super User
Super User

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

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. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.