Print Page | Close Window

Date Difference

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=11147
Printed Date: 28 Apr 2024 at 2:39pm


Topic: Date Difference
Posted By: andyp
Subject: Date Difference
Date Posted: 20 Sep 2010 at 10:47am
I have a problem in comparing dates and working out the difference between them.
 
I have tried various ways and although on the right track I'm sure a simple solution exists out there somewhere!!
 
Example: 01/01/1980 - 24/08/2009
I am tyring to find a simple way to accurately calculate difference and see the result in the format xx years, xx months and xx days.
Where several sets of From/To dates exist (possibly with breaks in between) I then have the problem of addind up sets of years months and days in order to get a final total number of years months and days (if that makes sence).
 
 
andyp



Replies:
Posted By: Senthil Raj
Date Posted: 21 Sep 2010 at 1:10am


-------------
Live And Let Live...


Posted By: andyp
Date Posted: 21 Sep 2010 at 7:34am
Thanks very much for the tip. I will try it first thing tomorrow at work and let you know how I got on. (Ive just got hope , time now here in Germany 19.30.
 
Thanks again for your reply!
 
AndyP


Posted By: andyp
Date Posted: 23 Sep 2010 at 10:59pm
I have had chance to work on my date difference report again today. Your tips have really helped me, thanks once again
 
Andy


Posted By: jeevan485
Date Posted: 12 Jul 2011 at 5:18am
Dears,
 
If i have database fields for dates then how i will get the difference between two days in days months and years (eg 1 Year,11 Months, 13 Days)
 
eg:
 
{EmpLeaveSettlement.LeavingDt} - {EmpMast.JoinDt}



Print Page | Close Window