I have a simple line of Crystal Reports code below:
EffectiveDateTimeString = ToText({Command.EffectiveDate} , \"dd-MM-yyyy hh:mm:ss\" );
H
Try this:
EffectiveDateTimeString := CStr(DateTime({Command.EffectiveDate} , "dd/MM/yyyy hh:mm:ss" ));
If {Command.EffectiveDate} is not in the right format, this will ensure that it is indeed DateTime.
If that doesn't work, I just created a simple formula in a sample report of mine, and the below code worked just fine on a DateTime field:
stringVar EffectiveDateTimeString;
EffectiveDateTimeString := CStr({Command.EffectiveDate}, "dd/MM/yyyy hh:mm:ss");
EffectiveDateTimeString