Hey,
You can use the below logic :
@concat(substring(pipeline().parameters.Test,0,4 ),'-',substring(pipeline().parameters.Test,4,2),'-',substring(pipeline().parameters.Test,6,2))
Using dataflows:
https://learn.microsoft.com/en-us/answers/questions/135485/azure-data-factory-date-conversion.html
{
"name": "pipeline1",
"properties": {
"activities": [
{
"name": "Set variable1",
"type": "SetVariable",
"dependsOn": [],
"userProperties": [],
"typeProperties": {
"variableName": "Test",
"value": {
"value": "@concat(substring(pipeline().parameters.Test,0,4 ),'-',substring(pipeline().parameters.Test,4,2),'-',substring(pipeline().parameters.Test,6,2))",
"type": "Expression"
}
}
}
],
"parameters": {
"Test": {
"type": "string",
"defaultValue": "20221223"
}
},
"variables": {
"Test": {
"type": "String"
}
},
"annotations": []
}
}