Forum Discussion
Stinkys
1 year agoAdvocate II
Creating Composite Primary Key
Hi all, I am trying to understand the best method for creating a composite primary key where one of the columns is a date. I have several columns that when combined create my unique record - int,...
- 1 year ago
Hi, in DataFlow Gen2, you first need to convert the date format to a string format where you have defined the string format yourself. An example of a query will look like this:
Table.TransformColumns(#"Changed column type", {{"Column1", each Date.ToText(Date.From(_),"yyyy-MM-dd"), type text}})If you want to achieve this with Python use something like
.strftime('%Y-%m-%d')
FabianSchut
1 year agoSolution Sage
Hi, in DataFlow Gen2, you first need to convert the date format to a string format where you have defined the string format yourself. An example of a query will look like this:
Table.TransformColumns(#"Changed column type", {{"Column1", each Date.ToText(Date.From(_),"yyyy-MM-dd"), type text}})
If you want to achieve this with Python use something like
.strftime('%Y-%m-%d')