How to convert DateTime object to string in Crystal Reports

Viewed 64495

I have a simple line of Crystal Reports code below:

EffectiveDateTimeString = ToText({Command.EffectiveDate} , "dd-MM-yyyy hh:mm:ss" );

However, when I try to validate the formula, I get a error saying "Too many arguments have been given to this function" with "dd-MM-yyyy hh:mm:ss" selected. Command.EffectiveDate is the DateTime object. How can I convert this to a string?

Thanks!

2 Answers
Related