Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: more date questions Post Reply Post New Topic
Author Message
jjjb
Newbie
Newbie


Joined: 10 Aug 2009
Online Status: Offline
Posts: 13
Quote jjjb Replybullet Topic: more date questions
     Posted: 12 Aug 2009 at 12:20pm
hello again,

would the datediff function work to find dates >2 and <4 not including weekends?

thanks for the help!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 Aug 2009 at 12:32pm
not sure what >2 and <4 is in your question...
 
You can exclude weekends by using this in your select statement...
DayofWeek({table.datefield},crMOnday) in 1 to 5
IP IP Logged
jjjb
Newbie
Newbie


Joined: 10 Aug 2009
Online Status: Offline
Posts: 13
Quote jjjb Replybullet Posted: 12 Aug 2009 at 12:51pm
the report will pull data 2 days out but less than 4 days not including weekends.

so if today is the 12th, it will pull data from day 15 but not beyond the 17th.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 Aug 2009 at 1:10pm

Assuming you want this to run from todays date always...

datediff("d",currentdate,{table.datefield}) in 3 to 5 and
DayofWeek({table.datefield},crMonday) in 1 to 5
IP IP Logged
jjjb
Newbie
Newbie


Joined: 10 Aug 2009
Online Status: Offline
Posts: 13
Quote jjjb Replybullet Posted: 12 Aug 2009 at 1:24pm
nice, that worked perfectly.

so any suggestions on how i can learn this stuff my self? lol

i had ask earlier on my other post too.  i need something with real world examples, any suggestions?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 Aug 2009 at 1:36pm
 
Here is what I recommend:
1. Get Brian's book (link on this page) and read it. Don't let it sit on the shelf like I do with my books. Wink
2. Use the Help File in Crystal. Just use key word search and read as much of it as you can. Follow it and do the "examples" on your own data in sandbox reports.
3. Read as many posts on this site as you can from this site. mimic the problem and recommended solutions as much as you can in your sandbox reports. These are the best "real world examples" that I have seen. It will make you use parts of crystal that you may never even have looked at before.
I learn a lot from reading the other posts. You never know when a trick you see there will be what you need on the next report. Or you see a more efficient way to do something for future reports.
 
Hope these help Thumbs%20Up.


Edited by DBlank - 12 Aug 2009 at 1:37pm
IP IP Logged
jjjb
Newbie
Newbie


Joined: 10 Aug 2009
Online Status: Offline
Posts: 13
Quote jjjb Replybullet Posted: 12 Aug 2009 at 1:50pm
are these ebooks for 24.95? or just access for a period of time?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 Aug 2009 at 2:01pm
I believe that it is 24.95 for 3 months of on-line access to all 3 books but Brian will probably pop in and clarify.
I have the paper version (which you can get on Amazon) so have not used the on-line access.
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