Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Date/time question.. help appreciated Post Reply Post New Topic
Author Message
JeremyM
Newbie
Newbie


Joined: 26 May 2011
Online Status: Offline
Posts: 2
Quote JeremyM Replybullet Topic: Date/time question.. help appreciated
    Posted: 26 May 2011 at 2:33pm
I hope someone can help me.

Essentially Im writing a report to pull production information from specific times between 2 date ranges..

My question is.. Im looking to pull information between 3am and 5pm on all dates in the date range, nothing outside those times.

Everything I have tried has pulled info after 5pm for the days in between the start and end date, which is no good.

IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 27 May 2011 at 2:08am
Have you tried to put the exception into the Record section of the Selection Formulas?

Try something like:

(time({table.datetime}) >= time("3:00 pm")
and
time({table.datetime})<= time("5:00 pm"))

|< /\ '][' ( )
IP IP Logged
JeremyM
Newbie
Newbie


Joined: 26 May 2011
Online Status: Offline
Posts: 2
Quote JeremyM Replybullet Posted: 27 May 2011 at 11:05am
Thank you so much for you reply.. I ended up figuring it out around 1AM last night using something very similiar in the record selection.

{PDIssues.ModDate}>=dateadd("h",3,{?rvRecDate}) and {PDIssues.ModDate}< dateadd("h",16,{?rvEndDat})
and ctime({PDIssues.ModDate}) in ctime(#03:00#) to ctime(#16:00#)

I started out with the first 2 lines testing 1 day at a time, it wasnt until I was doing a range of 2 days or greater that I had issues, because it would grab all 24hrs in the days between the 1st day and the last day.. adding the 3rd line resolved the issue.

Probably isnt the prettiest resolution.. but hey.. it worked :)

Thank you very much for taking the time to respond to my question
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.016 seconds.