I want to specify
LinkControlToDate.CustomFormat := 'IfThen(%s=0, '''', FormatDateTime(''ddddd'', %s))'
for the property CustomFormat
of a TLinkControlToField
to handle 0 date values.
But this yields a EConvertError
'no argument for format 'IfThen(%s=0, '', FormatDateTime''
Is it not possible to use a function inside a function with CustomFormat
?
You use the parameter %s
twice, but there is only one parameter.
Try
LinkControlToDate.CustomFormat := 'IfThen(%s=0, '''', FormatDateTime(''ddddd'', %:0s))'
Use an index specifier for the second %s
.