Tips and Tricks
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Tips and Tricks
Message Icon Topic: Calculate Day number of the year in Crystal Report Post Reply Post New Topic
Author Message
krishreddy
Newbie
Newbie


Joined: 18 May 2012
Location: India
Online Status: Offline
Posts: 11
Quote krishreddy Replybullet Topic: Calculate Day number of the year in Crystal Report
    Posted: 22 May 2012 at 9:06pm
Hi,

We are using SAP Crystal Report 2011. Here I am trying to calculate the values like invoice_qty is <183 days and invoice_qty >= 183 days in the year.
So I want to create a field day number of the year like if invoice date is 10thFeb2012 then day number will be 41.
Could you please suggest me how can I get day number of the year.

With Regards,
Krishna Reddy.
IP IP Logged
rkrowland
Senior Member
Senior Member
Avatar

Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
Quote rkrowland Replybullet Posted: 22 May 2012 at 10:32pm
datediff("d",date(year({table.date}),1,1),{table.date})
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 23 May 2012 at 4:20am
you can use datepart() as well
 
datepart('y',{table.datefield})
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.047 seconds.