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

date difference

Status
Not open for further replies.

damzi

Programmer
May 3, 2004
66
0
0
US
Hi,
In one of my columns in a Reportnet report, i have to bring in the diffrence between today's date and 2 yrs frm now - so how can i calculate the difference between the 2 ? Any ideas ?
D
 
damzi,
Wouldn't the difference between Today's date and 2 years from now be 2 years?
If you're looking for the number of days the calc would be something like:
DateDiff(Today(),Add-Years(Today,2))

If you're looking for the date two years from today it would be something like:
Add-Years(Today,2)

I am what I am based on the decisions I have made.

DoubleD [bigcheeks]
 
In the expression editor you will see a folder for 'business' calculations. These 'functions' allow you to perform various common 'date' calculations such as add/subtract days etc. You will also see the constructs for current timestamp, date and time etc ni the expression tree.

These are internally re-mapped to the semantically equivalent functions in the underlying RDBMS. Which save you using vendor specific functions if you don't want to.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top