Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please help to find date difference 1

Status
Not open for further replies.

nimsam

Programmer
Sep 4, 2002
11
LK
I have two datetime field, and I need to know the duration between the days (how long does it take). My two datetime field are {startting date} and {closingdate}. I am trying to subtract {startingdate}-{closingdate} in the crystal report as a formula field . But the result is no of days, but I want to know how many years , months & date ? . I think the problem is that Crystal report does not have a formula to calculate how many years , months , days when it calculate the date diffirence. So, can anyone help me please? Thanks in advance
 
Download the DateTimeDiff ufl from the Crystal site, and use that.

Alternatively, use the business hours formula on Ken Hamady's website ( or the formula on thread149-334608. The ufl route is the most straightforward.

Naith
 
Sorry, I don't know why I thought you were trying to calculate DateTimes as opposed to plain old Dates.

Use DateDiff({StartingDate},{ClosingDate})

Naith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top