Thursday, March 29, 2012

Date range problem in crystal report 8.5

Hi all

I have a problem in using date range

If i select a date range,need to get values for proveious years june 1st to may 31st of current year

ex: 02/01/2006 - 02/28/2006(Current)

need to get values for 06/01/2005 - 05/31/2006 date range

could any one help me in writing formula for this

Thanks in advancedoesn't look like real question ,, , pls be specific|||Thanks for your reply

i would like to give you more specific

In my requiremnet if i selected a date range ex:01/06/2006 - 31/06/2006

need to get the values of preveious years of June 1st - current years May 31st

01/06/2005 - 31/05/2006 values should display

actually we have two fields in that in first field need to display the first date range values and in second one need to do like that

We have two fields named

current and year to date

current means date range the user selected

Year to date means data from June 1 of previous year to May 31 st of Current year|||Hi
use this formula
datetime('01-jan-2006')-365

include if condition to handle leap year
Hope it helps|||It's very simple just use this formula in formula field

formula =DateAdd ("yyyy",-1 , {YOUR DATE })

and use this formula wherever you want to use same date of previous year

Best Luck...|||Thanks for your reply

its useful for me

could you pls tell how to take fixed date 1st june to end date 31st may

No comments:

Post a Comment