I have crystal reports and in formula editor, based on date.
If {?PDATERANGE1} <> "" AND {?PDATERANGE2} <> "" Then
ToText(DateValue({?PDATERANGE1}), "MMM d, yyyy") & " - " & ToText(DateValue({?PDATERANGE2}), "MMM d, yyyy")
I am calling this from ASP and PDATERANGE1 and PDATERANGE2 are “10/10/2001” and “10/12/2001”.
I am getting the following error.
Bad date format string. Details: errorKind Error in File {B6624BE5-D6DA-469B-A635-9FE86B125492}.rpt: Error in formula dt_range: ‘If {?PDATERANGE1} <> “” AND {?PDATERANGE2} <> “” Then ‘ Bad date format string. Details: errorKind
Could someone please tell me what is wrong? I am not a crystal reports developer.
If the values of
{?PDATERANGE1}and{?PDATERANGE2}include double quotes – so that they are"10/10/2001"and"10/12/2001"respectively – then these double quotes need to be removed (so that they become10/10/2001and10/12/2001respectively).