Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: need data logged between certain time period daily Post Reply Post New Topic
Author Message
Pam.1980
Newbie
Newbie


Joined: 06 Aug 2009
Online Status: Offline
Posts: 12
Quote Pam.1980 Replybullet Topic: need data logged between certain time period daily
     Posted: 06 Aug 2009 at 11:53am
need data logged between certain time period daily
 
Hi,
 
I need to report only those complaints logged between 6PM and 6AM daily for a given period say June 1 to June 30, 2009.
 
Field is 'Date Logged' which has data in this format as e.g. - 6/3/09  13:20
 
I tried the following but it did not work:
 
Time(DateTime({TABLE_DATES.DATE_LOGGED})) in Time (18, 00, 00) to Time (06, 00, 00)
 
Any help is appreciated.
 
Thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Aug 2009 at 1:58pm
try:
(Time(DateTime({TABLE_DATES.DATE_LOGGED})) in TIME(00, 00, 00) to TIME(06,00,00)
or
Time(DateTime({TABLE_DATES.DATE_LOGGED})) in TIME(18, 00, 00) to TIME(23,59,59))
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Aug 2009 at 2:02pm
or ...
NOT (Time(DateTime({TABLE_DATES.DATE_LOGGED})) in Time (06, 00, 00) to Time (18, 00, 00))
IP IP Logged
Pam.1980
Newbie
Newbie


Joined: 06 Aug 2009
Online Status: Offline
Posts: 12
Quote Pam.1980 Replybullet Posted: 07 Aug 2009 at 7:30am
Thank you for your responses DBlank
 
I tried these and get the error message: A date is required here - it trips on my database field.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Aug 2009 at 10:13am
what is the {TABLE_DATES.DATE_LOGGED} field type?
IP IP Logged
Pam.1980
Newbie
Newbie


Joined: 06 Aug 2009
Online Status: Offline
Posts: 12
Quote Pam.1980 Replybullet Posted: 09 Aug 2009 at 6:27pm
It's a date field and this worked for me:
 
NOT (TIME({TABLE_DATES.DATE_LOGGED}) in Time (06, 00, 00) to Time (18, 00, 00))
 
Thanks!
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