Hello All,
I have been trying to edit Xml for formula tool [Date] but somehow getting syntax error I figured out the issue but not able to add apostrophe " ' ".
this is syntax I'm using
'<FormulaField expression="DateTimeFormat(DateTimeParse('+[FieldName_Bracket]+',"'+[Date_Format_Alteryx] +'"),"%Y-%m-%d")" field="'+[DummyColumnName]+'" size="10" type="Date" />'
this is the after reading variable :
'<FormulaField expression="DateTimeFormat(DateTimeParse([Trd_Dt],"%Y%m%d"),"%Y-%m-%d")" field="Trd_Dt_DummyColumn" size="10" type="Date" />'
according to my finding it is these two ---> "%Y%m%d"),"%Y-%m-%d" --> it should be surrounded by apostrophe " ' " instead of quote
May be I'm wrong , just wanted to correct this formula.
'<FormulaField expression="DateTimeFormat(DateTimeParse('+[FieldName_Bracket]+',"'+[Date_Format_Alteryx] +'"),"%Y-%m-%d")" field="'+[DummyColumnName]+'" size="10" type="Date" />'
any help would be appreciated.
Thanks,
Mukesh Y
Solved! Go to Solution.
@Mukeshy12390 If your formula has quotes, the easiest path is to convert them to "
So it would be something like this:
'<FormulaField expression="DateTimeFormat(DateTimeParse('+[FieldName_Bracket]+',"'+[Date_Format_Alteryx] +'"),"%Y-%m-%d")" field="'+[DummyColumnName]+'" size="10" type="Date" />'
If you look at a formula tool's xml, you can see this same structure:
Thanks !! you are awesome.