-
May 4th, 2010, 06:32 AM
#1
[RESOLVED] Date Comparsion in Formula field
Hi am using Date Comparsion in Crystal Report selection Formula as
if (strcmp({?Fromdate},'Nothing')=0 and strcmp({?Todate},'Nothing')=0) then
(
{Command.COMPANYID}={?CompanyId} and
{Command.MODIFIEDDTTM}={Command.MODIFIEDDTTM} and
{Command.CLASSIFICATION} = (if strcmp({?Classification},'Nothing')=0 then {Command.CLASSIFICATION} else {?Classification}) and
{Command.MODIFIEDBY} = (if strcmp({?ModifiedBy},'Nothing')=0 then {Command.MODIFIEDBY} else {?ModifiedBy}) and
{Command.FORMID} = if({?FormId}<> -1) then CDbl({?FormId})else{Command.FORMID}
)
else
(
{Command.COMPANYID}={?CompanyId} and
{Command.MODIFIEDDTTM} <= CDateTime({?Todate}) and
{Command.MODIFIEDDTTM} >= CDateTime({?Fromdate}) and
{Command.CLASSIFICATION} = (if strcmp({?Classification},'Nothing')=0 then {Command.CLASSIFICATION} else {?Classification}) and
{Command.MODIFIEDBY} = (if strcmp({?ModifiedBy},'Nothing')=0 then {Command.MODIFIEDBY} else {?ModifiedBy}) and
{Command.FORMID} = if({?FormId}<> -1) then CDbl({?FormId}) else {Command.FORMID}
)
This formula currently showing records greater than todate. What I am doing wrong
Thanks,
VS 2005
-
May 4th, 2010, 08:26 AM
#2
Re: Date Comparsion in Formula field
No I found the issue...
Replaced
CDateTime
with
CDate
This Solved the Issue
VS 2005
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|