I'm using CR Developer 12.2.0.290 to create reports from MS SQL Server. A 3rd party Print MIS system is the interface to the SQL db.
The report I created calculates the number of days between 2 tasks and everything seems to be working wonderfully except for the way it displays the 2nd date (which may or may not be present)
When I run the report in Crystal in the original design I created, the datetime field (converted to text using totext because it prints "na" if the field is empty) displays as m/dd/yy which is exactly what I want. When I run it from the 3rd party software interface, that field appears as d/mm/yyyy hh:mm:ssAM.
I tried modifying the formula to force the format to what I want it to be. I specified "m/dd/yy" in the totext formula. Now, when I run the report from either location (CR or 3rd party), the date appears as 0/dd/yy. Why did the month become a 0 in all instances that it should appear?
Here's the formula I was working with:
Thanks in advance for any help!
The report I created calculates the number of days between 2 tasks and everything seems to be working wonderfully except for the way it displays the 2nd date (which may or may not be present)
When I run the report in Crystal in the original design I created, the datetime field (converted to text using totext because it prints "na" if the field is empty) displays as m/dd/yy which is exactly what I want. When I run it from the 3rd party software interface, that field appears as d/mm/yyyy hh:mm:ssAM.
I tried modifying the formula to force the format to what I want it to be. I specified "m/dd/yy" in the totext formula. Now, when I run the report from either location (CR or 3rd party), the date appears as 0/dd/yy. Why did the month become a 0 in all instances that it should appear?
Here's the formula I was working with:
Code:
shared stringvar invoice;
if isnull({WinAcctBatch.DatePostRan}) then
invoice:="na"
else
invoice:=totext({WinAcctBatch.DatePostRan},"m/dd/yy"); [COLOR=#ff0000](gives me 0/dd/yy no matter where I run it)[/color]
//invoice:=totext({WinAcctBatch.DatePostRan}); [COLOR=#ff0000](gives me m/dd/yy in CR and the full datetime in 3rd party sw)[/color]
invoice
Thanks in advance for any help!