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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
lastnn30
Post Patron
Post Patron

Datevalue() function to return only date without time

Hi

I have a column in a table which has dates formatted as text (moved to the left hand side). I used Datevalue to convert them to dates. It did work but each date has time as well. I wonder if I can fornce Datevalue() to return only date. Thank you very much.

1 ACCEPTED SOLUTION
FreemanZ
Community Champion
Community Champion

try to wrap with FORMAT,

= FORMAT(DATEVALUE(), "YYYY/MM/DD")

View solution in original post

2 REPLIES 2
FreemanZ
Community Champion
Community Champion

try to wrap with FORMAT,

= FORMAT(DATEVALUE(), "YYYY/MM/DD")

Greg_Deckler
Community Champion
Community Champion

@lastnn30 Try:

Column = 
  VAR __Space = SEARCH(" ",[DateTime])
  VAR __Date = LEFT([DateTime],__Space)
  VAR __Result = DATEVALUE(__Date)
RETURN
  __Result


Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

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.