Solved

Creating a date range formula

Posted on 2008-06-24
10
942 Views
Last Modified: 2012-05-05
I am creating a crystal report and need to know how to pull a date range of 2:00PM yesterday to 4:00AM Current Date.

0
Comment
Question by:SAW56
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 5

Expert Comment

by:analliah
ID: 21858524
on your select criteria,
 {date.field} in {?Startdate} to {?endDate}

?startdate
?enddate is your parameter

0
 
LVL 5

Expert Comment

by:analliah
ID: 21858531
create your paramters to be datetime
0
 
LVL 5

Expert Comment

by:analliah
ID: 21858591
without parameter:
 on your select expert click new then choose your date.field
choose the is between and choose your start date and end date
date.jpg
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 101

Accepted Solution

by:
mlmcc earned 500 total points
ID: 21858747
If you always want that range simply use a formula like this for the select expert


 {date.field} in DateTime(CurrentDate - 1,Time(14,00,00)) to DateTime(CurrentDate,Time(04,00,00))

mlmcc
0
 
LVL 28

Expert Comment

by:bdreed35
ID: 21858831
If you simply want to always run from 4 pm yesterday to 2 am today, then you can use this logic in your record selection formula:

{table.datetimefield} in datetime(currentdate-1,time(16,0,0)) to datetime(currentdate,time(2,0,0))
0
 
LVL 28

Expert Comment

by:bdreed35
ID: 21858844
I guess I should have refreshed the page before posting.  

mlmcc, I guess we had the exact same solution.
0
 
LVL 28

Expert Comment

by:bdreed35
ID: 21858858
Except I had the times screwed up...
0
 

Author Comment

by:SAW56
ID: 21867201
Thanks for all your help....it worked perfectly
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
How to increase the row limit in Jasper Server.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question