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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
i_stanescu_ro
Helper I
Helper I

Change number into date

Hi guys

 

I have a column with numbers with this format:

 

19990927

 

I need to change it to a date format, like this: 09.27.1999 or 27.09.1999 or something like this..

 

Can I pls ask for your help?

 

 

Thanks so much for your time!

1 ACCEPTED SOLUTION
Arul
Super User
Super User

@i_stanescu_ro ,

try this in calculated column,

New Date (Calculated Column) = 
VAR _year = LEFT(Test[Date],4)
VAR _month = MID(Test[Date],5,2)
VAR _day = RIGHT(Test[Date],2)
VAR _date = DATE(_year,_month,_day)
RETURN _date




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


View solution in original post

4 REPLIES 4
Arul
Super User
Super User

@i_stanescu_ro ,

try this in calculated column,

New Date (Calculated Column) = 
VAR _year = LEFT(Test[Date],4)
VAR _month = MID(Test[Date],5,2)
VAR _day = RIGHT(Test[Date],2)
VAR _date = DATE(_year,_month,_day)
RETURN _date




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


Thanks so much!

Fowmy
Super User
Super User

@i_stanescu_ro 

Create a calculated column, suppose your data is in a column called  TextData

var __Date = TABLENAME[TEXTDATA]

return

	DATE( INT(LEFT(__Date,4)) ,  INT(MID(__Date,5,2)) ,  INT(RIGHT(__Date,2)) )
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Thanks so much!

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Kudoed Authors