## Desktop

Frequent Visitor
Posts: 4
Registered: ‎08-24-2018

# Cannot convert value 'Monday' of type Text to type Number.

Hello,

I am trying to get the day name from a date but it keeps giving me the error below

Cannot convert value 'Monday' of type Text to type Number.

I am using the formula:   FORMAT('Views'[Created].[Day];"DDDD")

Any help would be appreciated!

Thanks

Accepted Solutions
Community Support Team
Posts: 2,010
Registered: ‎06-24-2018

## Re: Cannot convert value 'Monday' of type Text to type Number.

Hi @nakin,

Based on my test, you could try this formula:

`Number = FORMAT('Views'[Created].[Day],"DD")`

Result:

You can also download the PBIX file to have a view.

https://www.dropbox.com/s/hrbr3str316wtn6/Cannot%20convert%20value%20%27Monday%27%20of%20type%20Text...

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

All Replies
New Contributor
Posts: 444
Registered: ‎02-15-2018

## Re: Cannot convert value 'Monday' of type Text to type Number.

Just loose the .day.

FORMAT('Views'[Created];"DDDD")
Frequent Visitor
Posts: 4
Registered: ‎08-24-2018

## Re: Cannot convert value 'Monday' of type Text to type Number.

Hi,

I have used the formula without the .day     FORMAT('Views'[Created];"DDDD")

Now I have this error:

Cannot convert value 'Thursday' of type Text to type Number.

Highlighted
Super User
Posts: 1,183
Registered: ‎12-29-2015

## Re: Cannot convert value 'Monday' of type Text to type Number.

The FORMAT function takes a number (or date, because dates are just funny numbers) as its input. You can't give it the word "Monday" as its input. You have to give it an actual date.

Community Support Team
Posts: 2,010
Registered: ‎06-24-2018

## Re: Cannot convert value 'Monday' of type Text to type Number.

Hi @nakin,

Based on my test, you could try this formula:

`Number = FORMAT('Views'[Created].[Day],"DD")`

Result:

You can also download the PBIX file to have a view.

https://www.dropbox.com/s/hrbr3str316wtn6/Cannot%20convert%20value%20%27Monday%27%20of%20type%20Text...

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Frequent Visitor
Posts: 4
Registered: ‎08-24-2018

## Re: Cannot convert value 'Monday' of type Text to type Number.

Thanks for this, finally I used the WEEKDAY formula and it seems to work.

Thank you !