Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Date Range formula Post Reply Post New Topic
Author Message
punamgandi
Newbie
Newbie
Avatar

Joined: 28 Dec 2011
Location: India
Online Status: Offline
Posts: 3
Quote punamgandi Replybullet Topic: Date Range formula
     Posted: 28 Dec 2011 at 11:00pm
Hello,

In sap business one crystal reports,

I want to apply date range formula,, what would be the formula, ??
THe scenario is ...

I want to fetch data from start day of week to the present date.. the present date can be can be tuesday,or wed or thur or fri ...
it means i want to fetch data from mon to tue OR mon to Wed OR Mon to THurs OR mon To friday.

what would the formula.

awaiting for soonest reply.
Thanks in advance.
Punam Gandi
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 29 Dec 2011 at 3:28am
local numbervar dow := DayOfWeek(currentDate);
//1= sunday
//since we want to start on Monday = 2
{table.field} in DATEADD("d", -dow + 2, currentDate) to currentDate
 
I think this will work... 
 
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