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!

Future Date & then Difference

Status
Not open for further replies.

SSSFisgard

Technical User
Nov 7, 2006
27
0
0
Need some help on this one too.

Here's what I've got. I need to find out what the next quarter date is after {maturitydate.field}.

Example. my maturity date is Oct 26/07 what I need to find out is the next quarter ending date, which in my case would be Dec 31/07. And then calculate the difference in days, between those two dates. Which in my case is 66 days.

My end quarter dates are Dec 31, Mar 31, Jun 31, Sep 31

Crystal XI R2 & SQL

Any ideas?
 
Try:

datediff("d",{table.date},
dateserial(year(dateadd("q",1,{table.date})),
(datepart("q",dateadd("q",1,{table.date}))*3)+1,1)-1)

-LB
 
Try this:

local datetimevar input := {Orders.Order Date};
dateadd("m",1,dateadd("m",3-remainder(month(input),3),input))-day(input)

~Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top