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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculate Months to Current Date

Status
Not open for further replies.

techpielmorena

Programmer
Jan 24, 2006
3
US
Hi,

I'm trying to create a report that would show me how many months have elapsed (current date) since the record was created. The field that contains when the record was created is named: 313

Here's the existing formula that shows me date it was created:

{Cust_data.Obj_uniq} = {?Pm-client.acct_no} and {Cust_data.Field_No} = 313


Thanks in advance.
 
Do you mean the row that containts the {Cust_data.Field_No} = 313 is the one that contains the created date? If you use your formula above for record selection, then all you need to do is create a formula in the formula expert:

(currentdate - {table.date})/30

You could use datediff, but for months, it would should a one month difference if the created date was the last date of a month and the currentdate was the first of the next month.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top