Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: DateDiff Post Reply Post New Topic
Author Message
VickiM
Newbie
Newbie
Avatar

Joined: 02 May 2011
Location: United States
Online Status: Offline
Posts: 28
Quote VickiM Replybullet Topic: DateDiff
    Posted: 16 Aug 2013 at 2:18am
Hi.
 
I know this is probably really simple but I have no idea how to do.  How do I write a formula to find the datediff of someone's hire date and their term date in Access?
 
If you can help me, I'd certainly appreciate it.
 
Here is what I've figured out so far:  Yrs: DateDiff("yyyy",[LAWSON_EMPLOYEE]![DATE_HIRED],[LAWSON_EMPLOYEE]![TERM_DATE]) and it works sort of.  Right now it pulls the number of years based soley on the year so if someone started 7/1/2012 and left 5/1/2013, it shows 1 year.  I need it to show as a 0 since they were not here for an entire year.
 
Thanks!


Edited by VickiM - 16 Aug 2013 at 5:15am
VickiM
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 16 Aug 2013 at 5:26am
Do it by months, and determine on how many years (example  int(DateDiff("m",[LAWSON_EMPLOYEE]![DATE_HIRED],[LAWSON_EMPLOYEE]![TERM_DATE])/12)
IP IP Logged
VickiM
Newbie
Newbie
Avatar

Joined: 02 May 2011
Location: United States
Online Status: Offline
Posts: 28
Quote VickiM Replybullet Posted: 16 Aug 2013 at 6:42am
That worked beautifully!  Thank you so much!
VickiM
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.031 seconds.