Forum Discussion
Date format
- Anonymous6 years ago
Hi can you try these steps? It does seem to work for me:
1) in Power BI click on Edit Queries in the Home Tab
2) Look for the birthdate column, click on it
3) Go to the Transform tab and click on Split Column
4) Choose "By delimiter" and select "Custom" in the dropdown menu that pops up
5) In the textfield below the dropdown, type in "GMT"
6) Pick "left-most delimiter"
7) Press OK
8.) Power BI will split your data in two different columns named Birthdate.1 and Birthdate.2
Birthdate.1 will be transform to a Date/Time type.
9) Don't forget to go to the home tab and press Close&Apply
These steps will result in the following DateTime column
Let me know if this works for you.
Birthdate.1
31-12-1989 15:00:00 31-12-1989 15:00:00 31-12-1949 15:00:00 31-12-1989 15:00:00 31-12-1989 15:00:00 31-12-1989 15:00:00 31-12-1969 15:00:00 31-12-1959 15:00:00 31-12-1969 15:00:00 31-12-1989 15:00:00 31-12-1974 15:00:00 31-12-1988 15:00:00 31-12-1969 15:00:00 31-12-1993 15:00:00 31-12-1959 15:00:00 31-12-1979 15:00:00 31-12-1988 15:00:00 31-12-1998 15:00:00 31-12-1992 15:00:00 31-12-1949 15:00:00 31-12-1969 15:00:00 31-12-1959 15:00:00 31-12-1989 15:00:00 31-12-1987 15:00:00 31-12-1969 15:00:00 31-12-1964 15:00:00 31-12-1969 16:00:00 22-5-2001 17:00:00 31-12-1979 16:00:00 31-12-1994 16:00:00 31-12-2018 16:00:00 31-12-1989 16:00:00 10-7-1979 17:00:00 17-8-1971 17:00:00 31-12-2018 16:00:00 19-8-1979 17:00:00 31-12-1989 16:00:00 31-12-1938 16:00:00 31-12-2018 16:00:00 16-12-2019 16:00:00 16-12-2019 16:00:00 16-12-2019 16:00:00 19-12-2019 16:00:00 31-12-2018 16:00:00 25-12-2019 16:00:00 - 6 years ago
Hi Anonymous ,
Try the following DAX, I think region is the problem.
Column = var a =SEARCH(" ",'Table'[birthDate],1)+1 var b = SEARCH(" ",'Table'[birthDate],5)+1 var c = SEARCH(" ",'Table'[birthDate],9)+1 var d = MID('Table'[birthDate],a,3) var e = SWITCH( TRUE(), d="Dec",12, d="Nov",11, d="Oct",10, d="Sep",9, d="Aug",8, d="Jul",7, d="Jun",6, d="May",5, d="Apr",4, d="Mar",3, d="Feb",2, d="Jan",1 ) return IF(c=12, MID('Table'[birthDate],b,2), 0&MID('Table'[birthDate],b,1) ) &"-"&e&"-"&MID('Table'[birthDate],c,4)Here is the test file for your reference.
Hi Anonymous ,
Your file has limitation so I cannot download it.
You need to set it like the following image:
Sorry I didn't take care :
- Gordonlilj6 years agoSolution Sage
Try creating a custom column with the power query editor instead and see if you get the same error
The code would be something like
Text.BetweenDelimiters([BirthDate]," ", " ",1,0) & "/" & Text.BetweenDelimiters([BirthDate]," ", " ",0,0) & "/" & Text.BetweenDelimiters([BirthDate]," ", " ",2,0)then change the type
- Anonymous6 years agoNot applicable
I don't know why but isn't work. BirthDate Sun Dec 31 1989 15:00:00 GMT-0800 (Pacific Standard Time) Sun Dec 31 1989 15:00:00 GMT-0800 (Pacific Standard Time) Sat Dec 31 1949 15:00:00 GMT-0800 (Pacific Standard Time) Sun Dec 31 1989 15:00:00 GMT-0800 (Pacific Standard Time) Sun Dec 31 1989 15:00:00 GMT-0800 (Pacific Standard Time) Sun Dec 31 1989 15:00:00 GMT-0800 (Pacific Standard Time) Wed Dec 31 1969 15:00:00 GMT-0800 (Pacific Standard Time) Thu Dec 31 1959 15:00:00 GMT-0800 (Pacific Standard Time) Wed Dec 31 1969 15:00:00 GMT-0800 (Pacific Standard Time) Sun Dec 31 1989 15:00:00 GMT-0800 (Pacific Standard Time) Tue Dec 31 1974 15:00:00 GMT-0800 (Pacific Standard Time) Sat Dec 31 1988 15:00:00 GMT-0800 (Pacific Standard Time) Wed Dec 31 1969 15:00:00 GMT-0800 (Pacific Standard Time) Fri Dec 31 1993 15:00:00 GMT-0800 (Pacific Standard Time) Thu Dec 31 1959 15:00:00 GMT-0800 (Pacific Standard Time) Mon Dec 31 1979 15:00:00 GMT-0800 (Pacific Standard Time) Sat Dec 31 1988 15:00:00 GMT-0800 (Pacific Standard Time) Thu Dec 31 1998 15:00:00 GMT-0800 (Pacific Standard Time) Thu Dec 31 1992 15:00:00 GMT-0800 (Pacific Standard Time) Sat Dec 31 1949 15:00:00 GMT-0800 (Pacific Standard Time) Wed Dec 31 1969 15:00:00 GMT-0800 (Pacific Standard Time) Thu Dec 31 1959 15:00:00 GMT-0800 (Pacific Standard Time) Sun Dec 31 1989 15:00:00 GMT-0800 (Pacific Standard Time) Thu Dec 31 1987 15:00:00 GMT-0800 (Pacific Standard Time) Wed Dec 31 1969 15:00:00 GMT-0800 (Pacific Standard Time) Thu Dec 31 1964 15:00:00 GMT-0800 (Pacific Standard Time) Wed Dec 31 1969 16:00:00 GMT-0800 (Pacific Standard Time) Tue May 22 2001 17:00:00 GMT-0700 (Pacific Daylight Time) Mon Dec 31 1979 16:00:00 GMT-0800 (Pacific Standard Time) Sat Dec 31 1994 16:00:00 GMT-0800 (Pacific Standard Time) Mon Dec 31 2018 16:00:00 GMT-0800 (Pacific Standard Time) Sun Dec 31 1989 16:00:00 GMT-0800 (Pacific Standard Time) Tue Jul 10 1979 17:00:00 GMT-0700 (Pacific Daylight Time) Tue Aug 17 1971 17:00:00 GMT-0700 (Pacific Daylight Time) Mon Dec 31 2018 16:00:00 GMT-0800 (Pacific Standard Time) Sun Aug 19 1979 17:00:00 GMT-0700 (Pacific Daylight Time) Sun Dec 31 1989 16:00:00 GMT-0800 (Pacific Standard Time) Sat Dec 31 1938 16:00:00 GMT-0800 (Pacific Standard Time) Mon Dec 31 2018 16:00:00 GMT-0800 (Pacific Standard Time) Mon Dec 16 2019 16:00:00 GMT-0800 (Pacific Standard Time) Mon Dec 16 2019 16:00:00 GMT-0800 (Pacific Standard Time) Mon Dec 16 2019 16:00:00 GMT-0800 (Pacific Standard Time) Thu Dec 19 2019 16:00:00 GMT-0800 (Pacific Standard Time) Mon Dec 31 2018 16:00:00 GMT-0800 (Pacific Standard Time) Wed Dec 25 2019 16:00:00 GMT-0800 (Pacific Standard Time) - Anonymous6 years agoNot applicable
Hi can you try these steps? It does seem to work for me:
1) in Power BI click on Edit Queries in the Home Tab
2) Look for the birthdate column, click on it
3) Go to the Transform tab and click on Split Column
4) Choose "By delimiter" and select "Custom" in the dropdown menu that pops up
5) In the textfield below the dropdown, type in "GMT"
6) Pick "left-most delimiter"
7) Press OK
8.) Power BI will split your data in two different columns named Birthdate.1 and Birthdate.2
Birthdate.1 will be transform to a Date/Time type.
9) Don't forget to go to the home tab and press Close&Apply
These steps will result in the following DateTime column
Let me know if this works for you.
Birthdate.1
31-12-1989 15:00:00 31-12-1989 15:00:00 31-12-1949 15:00:00 31-12-1989 15:00:00 31-12-1989 15:00:00 31-12-1989 15:00:00 31-12-1969 15:00:00 31-12-1959 15:00:00 31-12-1969 15:00:00 31-12-1989 15:00:00 31-12-1974 15:00:00 31-12-1988 15:00:00 31-12-1969 15:00:00 31-12-1993 15:00:00 31-12-1959 15:00:00 31-12-1979 15:00:00 31-12-1988 15:00:00 31-12-1998 15:00:00 31-12-1992 15:00:00 31-12-1949 15:00:00 31-12-1969 15:00:00 31-12-1959 15:00:00 31-12-1989 15:00:00 31-12-1987 15:00:00 31-12-1969 15:00:00 31-12-1964 15:00:00 31-12-1969 16:00:00 22-5-2001 17:00:00 31-12-1979 16:00:00 31-12-1994 16:00:00 31-12-2018 16:00:00 31-12-1989 16:00:00 10-7-1979 17:00:00 17-8-1971 17:00:00 31-12-2018 16:00:00 19-8-1979 17:00:00 31-12-1989 16:00:00 31-12-1938 16:00:00 31-12-2018 16:00:00 16-12-2019 16:00:00 16-12-2019 16:00:00 16-12-2019 16:00:00 19-12-2019 16:00:00 31-12-2018 16:00:00 25-12-2019 16:00:00