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
amtanner
Regular Visitor

Date Separation - separating dates from timestamps

The data that I am using is importing as the following form "MM:DD:YYYY 00:00:00 __". (For example, "10/1/2015 12:00:00 AM".) I am not sure why it is doing this because the source of the data is simply in MM:DD:YYYY format. (I am importing this data from a SharePoint site, FYI.) How do I separate the date (MM:DD:YYYY) from the timestamp on the right side (00:00:00 __)? In the end, I am trying to zero in on the year, month, and quarter using a fiscal calendar but am unable to create the relationship between that calendar and the dates because of the timestamp attached. Suggestions?

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

Edit your query, select your column, go to the Transform tab and change the "Data Type" to Date instead of Date/Time.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Column = Table[date].[Date]
v-sihou-msft
Employee
Employee

@amtanner

 

Or you can use Format() function to remove the timestamp part.

 

Column = FORMAT(Table[date],"MM-DD-YYYY")

Regards,

Anonymous
Not applicable

Thank you!  This is exactly what I was looking for and is simple.

Greg_Deckler
Super User
Super User

Edit your query, select your column, go to the Transform tab and change the "Data Type" to Date instead of Date/Time.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.