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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

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
Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.