Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Formula that returns date of last day in quarter Post Reply Post New Topic
Author Message
ChzHdGrrl
Newbie
Newbie
Avatar

Joined: 07 Mar 2012
Online Status: Offline
Posts: 10
Quote ChzHdGrrl Replybullet Topic: Formula that returns date of last day in quarter
     Posted: 16 May 2012 at 8:13am

Does anyone know of a CR syntax formula that will return the date of the last day in the preceding calendar quarter? I have addressed all of my quarter-related data issues, but I need to include the quarter-end date in my report title.

Thanks in advance,
ChzHdGrrl
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 May 2012 at 9:13am
there is probably a more elegant solution but I think this works (assuming you mean preceding quarter from today's date).
 
dateserial(year(currentdate),datepart('q',currentdate)*3-2,1-1)


Edited by DBlank - 16 May 2012 at 9:19am
IP IP Logged
ChzHdGrrl
Newbie
Newbie
Avatar

Joined: 07 Mar 2012
Online Status: Offline
Posts: 10
Quote ChzHdGrrl Replybullet Posted: 16 May 2012 at 9:18am
Oh, thank you! My report looks awesome! You are terrific!
IP IP Logged
ChzHdGrrl
Newbie
Newbie
Avatar

Joined: 07 Mar 2012
Online Status: Offline
Posts: 10
Quote ChzHdGrrl Replybullet Posted: 14 Dec 2012 at 6:57am
Ok, so since I obviously don't understand how dateserial works (I've been playing with it for an hour today), I now need the last date of the preceding quarter.
 
I'm learning....but very slowly.
 
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