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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
cdn4lf
Frequent Visitor

Converting Date Format

Hi All,

 

I am trying to convert yyyy-MM-ddThh:mm:ss to yy-mm-dd.  Any help would be appreciated.

 

Thank you!

 

Sean

1 ACCEPTED SOLUTION
cdn4lf
Frequent Visitor

I figured this out.  I had to convert at the query level, not at the design level.

View solution in original post

6 REPLIES 6
NSE
New Member

What I did was first converting the data to date so for that I created an additional column with the formula "Date = Left(DateTimeColumn,10), then convert the date to whatever format you want in the Column tools, Data Type- Date and Format to the one you want.

amitchandak
Super User
Super User

If it is detected as date then

new = format([Table]date, "yy-mm-dd")

If it is text then

new = mid([Table]date,3,8)

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Is there a way to do this without needing to add a new column?  I was hoping for a workaround that would allow me to convert to date format.  

 

If I have to resort to coding, I can, but this affects multiple columns across a large number of tables.

 

Thank you,

cdn4lf
Frequent Visitor

I figured this out.  I had to convert at the query level, not at the design level.

VasTg
Memorable Member
Memorable Member

@cdn4lf 

 

Sean, 

 

Choose the datatype as date instead of datetime and select the format as yy-mm-dd in Report view.

 

Refer to the first screenshot and box 3. Choose the datatype and format dropdown.

 

https://docs.microsoft.com/en-us/power-bi/desktop-data-view

 

If it helps, mark it as a solution

Kudos are nice too

 

Connect on LinkedIn
cdn4lf
Frequent Visitor

I am unable to convert to date format.  I tried that before posting.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.