Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: How to determine the Julian Day of the Year Post Reply Post New Topic
Author Message
Chromeman
Newbie
Newbie
Avatar

Joined: 23 Mar 2009
Location: United States
Online Status: Offline
Posts: 4
Quote Chromeman Replybullet Topic: How to determine the Julian Day of the Year
     Posted: 23 Mar 2009 at 3:02pm
Hey guys, I'm new to Crystal XI and I could use help.  I need to determine the day of the year (example, March 23, 2009 would be day 82).  Anyone out there have a formula for this?
Thanks,
Chromeman
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 24 Mar 2009 at 6:53am
I would have thought that Crystal would have something built in, but it doesn't, but you can use DateDiff...I haven't tried, but something like:
datediff(d,{field}, datetime(year(now),1,1))
 
should work...just calculating the number of days from the start of the current year.  Hopefully that works for you.  You might need to play around a bit.
IP IP Logged
Chromeman
Newbie
Newbie
Avatar

Joined: 23 Mar 2009
Location: United States
Online Status: Offline
Posts: 4
Quote Chromeman Replybullet Posted: 24 Mar 2009 at 8:02am
Thanks, I'll give that a try...
Thanks,
Chromeman
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