Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Evalute on date portion of date/time? 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: Evalute on date portion of date/time?
    Posted: 05 May 2011 at 4:38am
Hi,
 
I have a report that has two date\time fields
but in my criteria I only want to evalute the date portion
 
so if date1 = 05052011 13:00:00
and date2 = 05052011 09:00:00  I want to accept if
 
Thanks
Joe
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 May 2011 at 5:32am
can you clarify your question more?
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 05 May 2011 at 6:24am
it sounds like you just want the date portion, so if they are datetime fields, you could do something like:
day(parameter)=day(field) and month(parameter)=month(field) and year(parameter) = year(field)
 
there is bound to be an easier / more elegant method, but it just is popping into my head right now....this is the long way around to the answer.
 
you could proably strip the time off of the parameter by doing a dateAdd() and then seeing if your field is in the range from the parameter to parameter + 1 day...or 23:59:59 if you are paranoid.
 
HTH
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.