>cInsertCommand = "insert into mytable (mydtfld) value (" + ; > ttoc(DateTime()) + ")" >>
cInsertCommand = "insert into mytable (mydtfld) values (?m.ltDatetime)" m.ltDatetime = datetime() SQLExec(m.lnHandle, m.cInsertCommand)If not (sounds not as you're trying macro substitution) then why not directly have the command itself instead of creating a string first:
insert into mytable (mydtfld) values (m.ltDatetime)If you still want it as a string I don't understand why you need a conversion when you're already doing a macro substitution:
cInsertCommand = "insert into mytable (mydtfld) values (DateTime())" *or cInsertCommand = "insert into mytable (mydtfld) values (m.ltDatetime)" m.ltDateTime = ... &cInsertCommandCetin