Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Case When? Post Reply Post New Topic
Author Message
techsupport
Groupie
Groupie


Joined: 03 Jun 2014
Location: United States
Online Status: Offline
Posts: 41
Quote techsupport Replybullet Topic: Case When?
    Posted: 08 Sep 2016 at 5:34am
Hello, I am trying to do a If or a Case formula

I have this in SQL and would like to find the correct syntax for CRW
CASE WHEN MONTH(GETDATE()) <= 7 THEN DATEFROMPARTS(YEAR(GETDATE()) , 6 , 30) ELSE DATEFROMPARTS(YEAR(GETDATE()) + 1 , 6 , 30) END


This is saying this year if it's <= July and then next year if it's greater than July
____________________
Thank you very much!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Sep 2016 at 6:14am
lots of ways to do this but here is one

DATE(YEAR(today)+ (if month(today)>6 then 1 else 0),6,30)
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.