Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: String to date +/- 5 days?? Post Reply Post New Topic
Author Message
jbalbo
Senior Member
Senior Member
Avatar

Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Quote jbalbo Replybullet Topic: String to date +/- 5 days??
     Posted: 04 Oct 2012 at 8:32am
HI
I have a string variable on a table as '12/01/2012'
I need to use it in record selection to compare to a date field +/- 5 days

something like
{?Pm-@Admit+90} in cdate({USER_DEFINED_DATA.CAD6}-5) to cdate({USER_DEFINED_DATA.CAD6}+5)

but this isn't working....

Thanks
Joe

IP IP Logged
jbalbo
Senior Member
Senior Member
Avatar

Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Quote jbalbo Replybullet Posted: 04 Oct 2012 at 8:44am
Datevalue doesnt work:(

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 04 Oct 2012 at 8:55am
is yoyur string variable the
or is it the actual field
{USER_DEFINED_DATA.CAD6}
IP IP Logged
jbalbo
Senior Member
Senior Member
Avatar

Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Quote jbalbo Replybullet Posted: 04 Oct 2012 at 9:01am
its {USER_DEFINED_DATA.CAD6}

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 04 Oct 2012 at 9:04am
Move your parenths
 
{?Pm-@Admit+90} in cdate({USER_DEFINED_DATA.CAD6})-5 to cdate({USER_DEFINED_DATA.CAD6})+5
IP IP Logged
jbalbo
Senior Member
Senior Member
Avatar

Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Quote jbalbo Replybullet Posted: 04 Oct 2012 at 9:08am
wow that was much easier than what I was working on trying to parse the string etc....lol



Thanks so much...

IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum