cancel
Showing results for
Did you mean:
Visitor

## Whole number in to yyyy,mm,w

Hi I have a problem to convert whole number to date. The numbers are like this: yyyymmweek

How can I do??

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team

## Re: Whole number in to yyyy,mm,w

As Matt mentioned, the we can't determine the day in a week, so you can only convert the number to date(Year/Month) and week seperately.

Besides spliting the column, you can also create custom columns using M code below:

```YearMonth = Text.Start(Text.From([Date]), 4) & "/" & Text.Middle(Text.From([Date]), 4, 2)

Week = Text.End(Text.From([Date]), 1)```

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 REPLIES 2
Super User

## Re: Whole number in to yyyy,mm,w

Well, if you had yyyymmdd i would say go into power query, split the column into 3, yyyy, Mm, dd and then merge again in the format dd-mm-yyyy. Then convert to a date. But I have no idea how to turn your week number into a date. I guess you will need to do it in Excel manually.

* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
Highlighted
Community Support Team

## Re: Whole number in to yyyy,mm,w

As Matt mentioned, the we can't determine the day in a week, so you can only convert the number to date(Year/Month) and week seperately.

Besides spliting the column, you can also create custom columns using M code below:

```YearMonth = Text.Start(Text.From([Date]), 4) & "/" & Text.Middle(Text.From([Date]), 4, 2)

Week = Text.End(Text.From([Date]), 1)```

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Announcements

Kudos to you if you earned one of these! Check your inbox for a notification.

#### Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

#### Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,224)