Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / FoxPro / Library Construction Kit Api / November 2006

Tip: Looking for answers? Try searching our database.

Calculate Difference Between 2 Dates

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Zeeshan Hussain - 02 Nov 2006 11:59 GMT
Hye,
i m new in using VFP i want to know how can we calculate difference between
2 dates. suppose a person joining date is 25-09-2005 and he resigned at
25-12-2006. The period between 2 dates is 1Year 3Month. i use gomonth()
function but i am not able to get the difference in year and month.
Fred Taylor - 02 Nov 2006 16:36 GMT
In VFP it's easy to get the difference in days, just subtract the two date
type fields from each other.  Once you have that number of days, you could
calculate the years/months etc, but's that's a lot more problematic as it is
entirely dependant on whatever your rules may be for what constitutes a
month.

Signature

Fred
Microsoft Visual FoxPro MVP

> Hye,
> i m new in using VFP i want to know how can we calculate difference
> between 2 dates. suppose a person joining date is 25-09-2005 and he
> resigned at 25-12-2006. The period between 2 dates is 1Year 3Month. i use
> gomonth() function but i am not able to get the difference in year and
> month.
Lee Mitchell - 03 Nov 2006 22:49 GMT
Hi Zeeshan Hussain:

Go to www.universalthread.com, click on the Downloads link, and choose
Visual FoxPro as the forum. In the ID text box of the query page, search
for "25738." The name of the download is "Age Calculator."

I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

*-- VFP9 HAS ARRIVED!! --*
Read about all the new features of VFP9 here:
http://msdn.microsoft.com/vfoxpro/

*--Purchase VFP 9.0 here:
http://www.microsoft.com/PRODUCTS/info/product.aspx?view=22&pcid=54787e64-52
69-4500-8bf2-3f06689f4ab3&type=ovr

Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/gp/lifeselectindex
  - VFP5 Mainstream Support retired June 30th, 2003
  - VFP6 Mainstream Support retired Sept. 30th, 2003

>Hye,
>i m new in using VFP i want to know how can we calculate difference between
>2 dates. suppose a person joining date is 25-09-2005 and he resigned at
>25-12-2006. The period between 2 dates is 1Year 3Month. i use gomonth()
>function but i am not able to get the difference in year and month.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.