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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
BUC
Frequent Visitor

Change DateTime to Date in API setup

Hi all,

 

I'm trying to build a semantic model that currently exists as an Excel Spreadsheet using a mixture of SQL Data pulled from some retail/booking software and some tabs that rely on manual data entry (basically I look after 6 ships and every day each captain will manually add how many passengers they had on board).  The SQL stuff is all fine but the Excel spreadsheet used formulas dependent  on these manually entered numbers, so long story short the model needs a way of being updated by the end user in as basic a way as possible.

 

To get around this I designed a basic MS Form to capture the data, then built a streaming dataset using API that takes the data entered and creates a table in Power BI which I can then join to the SQL-Driven tables.

 

However, when setting up the streaming bits the date field (which I need as a primary key) only has an option of DateTime, not Date, and the SQL Date fields are all just dates.  I can't edit the API data since it's live and everything is greyed out, the API data is not editable and while I could try and change the datatype in the SQL tables it seems a bit cart-before-horse.  

 

Any ideas on how I can get just the date to go into Power BI rather than DateTime?

BUC_0-1707308649066.png

 

1 REPLY 1
Anonymous
Not applicable

Hi @BUC ,

Base on your description, it sounds like you are trying to change the DateTime field to a Date field in your API setup. And you will create relationship between sql table and this api table base on date type field. You can create a a calculated column as below to get it:

Column = FORMAT([DateTimeColumn], "MM/DD/YYYY")

Best Regards

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.