Forum Discussion
satishr
8 years agoHelper III
How to retrieve and convert dates in custom visual?
Hi, I'm developing a custom visual where a bar chart should display values for last 15 days. I have date column and value column. I'm having a hard time retrieving the date values. Please help me. ...
- 8 years ago
You might use valueFormatter to format date to a proper format.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
v-viig
8 years agoCommunity Champion
You might use valueFormatter to format date to a proper format.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
- satishr8 years agoHelper III
Implemented it. But it shows month number incorrectly.
var dateFormatter = ValueFormatter.create({format: "dd/mm/yyyy"});var dateDisplay = minDateFormatter.format(myDate);The result is 02/53/2018 instead of 02/02/2018. Why?- satishr8 years agoHelper III
Solved the format problem. It should be "dd/MM/yyyy" instead of "dd/mm/yyyy". Small m represents minutes and capital M represents months. Thanks.