Forum Discussion
badgeming
8 years agoFrequent Visitor
MySQL - how do I add another column to return the integer of the date
Hi, I have a DateCreated column coming from a MySQL dataset where the values are in dd/mm/yy hh:mm:ss. I want to create another column that is just dd/mm/yy format without the hh:mm:ss bit (i.e an i...
- 8 years ago
So, in DAX, you could create a new column with this formula:
Column = INT([Date])
Then, set this to "Date" as a Data Type in the Modeling ribbon.
This works because DAX Date/Time is a numeric data type where the integer portion is the number of days from December 30th, 1899 and the decimal portion is the time component.
- 8 years ago
Excellent, thank you
Greg_Deckler
Community Champion
8 years agoSo, in DAX, you could create a new column with this formula:
Column = INT([Date])
Then, set this to "Date" as a Data Type in the Modeling ribbon.
This works because DAX Date/Time is a numeric data type where the integer portion is the number of days from December 30th, 1899 and the decimal portion is the time component.
badgeming
8 years agoFrequent Visitor
Excellent, thank you