Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (17.6k points)

I would think this is relatively straight forward but cant find documentation on how to do it(or the correct syntax to use) and my messing around hasn't worked so far.

For Dates we have a custom format called Month /Day /Year. This pulls back a the date(as a date type) in date format as such:

"14 April 2003"

The code behind this is:

(DATEPART('year', [Close Date])*10000 + DATEPART('month', [Close Date])*100 + DATEPART('day', [Close Date]))

What I want to get back is the month is numeric format like:

"14.04.2003"

Is it simply changing the "month" part in the code to a different type? Has any one come across this? 

1 Answer

0 votes
by (22.5k points)
edited by
  • Right-click on the format
  • Select format
  • Then select Scale
  • And click on the custom

Want to learn more about Power BI, Come & join Power BI tutorial. Also, enroll in Power BI classes online to become proficient in this BI tool.

 

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Apr 4, 2021 in Java by dante07 (13.1k points)
0 votes
1 answer
asked Nov 24, 2019 in Java by Anvi (10.2k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...