Tips and Tricks
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Tips and Tricks
Message Icon Topic: DateDiff formula Post Reply Post New Topic
Author Message
madams2
Newbie
Newbie


Joined: 28 Jul 2009
Online Status: Offline
Posts: 4
Quote madams2 Replybullet Topic: DateDiff formula
    Posted: 19 Oct 2009 at 10:48am
Hi all. I'm trying to find the number of 'years' and 'months' between two dates. I used the DateDiff function however, the 'months' isn't showing exactly how I had planned.
My formulas are:
DateDiff("yyyy", #09/17/2009#, #06/07/2004#) and
DateDiff("m", #09/17/2009#, #06/07/2004#)
I'm getting "5 years" and "63 Months". Would really like to see "5 years" and "3 months".

Is there trick to this, or do I have to subtract the 'years' x 12 from the 'months' calculation?

Thanks
IP IP Logged
madams2
Newbie
Newbie


Joined: 28 Jul 2009
Online Status: Offline
Posts: 4
Quote madams2 Replybullet Posted: 19 Oct 2009 at 11:01am
Got it figured out!
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.