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
Showing posts with label 31st. Show all posts
Showing posts with label 31st. Show all posts
Thursday, March 29, 2012
Tuesday, March 27, 2012
date query
Hi,
I'm trying to convert the last four numbers of the following string
SP1/84/056351/0406
to a date. It should default to the 31st of the month. In the above
case it would be 31st of April 2006. Anyone any ideas?declare @.str varchar(20)
set @.str = 'SP1/84/056351/0406'
declare @.month varchar(2)
declare @.year varchar(2)
set @.year = right (@.str,2)
select @.month = substring (@.str, len(@.str)-3,2)
select @.month
select @.year
select dateadd(m,1, convert(datetime,@.year+@.month+'01')) - 1
Regards
Amish Shah|||Thank you for the help Amish
Regards
Ross|||Thank you for the help Amish
Regards
Ross|||rosco wrote on 6 Mar 2006 02:24:13 -0800:
> Hi,
> I'm trying to convert the last four numbers of the following string
> SP1/84/056351/0406
> to a date. It should default to the 31st of the month. In the above
> case it would be 31st of April 2006. Anyone any ideas?
You want it to default to an invalid date? There are only 30 days in April.
Dan
I'm trying to convert the last four numbers of the following string
SP1/84/056351/0406
to a date. It should default to the 31st of the month. In the above
case it would be 31st of April 2006. Anyone any ideas?declare @.str varchar(20)
set @.str = 'SP1/84/056351/0406'
declare @.month varchar(2)
declare @.year varchar(2)
set @.year = right (@.str,2)
select @.month = substring (@.str, len(@.str)-3,2)
select @.month
select @.year
select dateadd(m,1, convert(datetime,@.year+@.month+'01')) - 1
Regards
Amish Shah|||Thank you for the help Amish
Regards
Ross|||Thank you for the help Amish
Regards
Ross|||rosco wrote on 6 Mar 2006 02:24:13 -0800:
> Hi,
> I'm trying to convert the last four numbers of the following string
> SP1/84/056351/0406
> to a date. It should default to the 31st of the month. In the above
> case it would be 31st of April 2006. Anyone any ideas?
You want it to default to an invalid date? There are only 30 days in April.
Dan
date query
Hi,
I'm trying to convert the last four numbers of the following string
SP1/84/056351/0406
to a date. It should default to the 31st of the month. In the above
case it would be 31st of April 2006. Anyone any ideas?
declare @.str varchar(20)
set @.str = 'SP1/84/056351/0406'
declare @.month varchar(2)
declare @.year varchar(2)
set @.year = right (@.str,2)
select @.month = substring (@.str, len(@.str)-3,2)
select @.month
select @.year
select dateadd(m,1, convert(datetime,@.year+@.month+'01')) - 1
Regards
Amish Shah
|||Thank you for the help Amish
Regards
Ross
|||Thank you for the help Amish
Regards
Ross
|||rosco wrote on 6 Mar 2006 02:24:13 -0800:
> Hi,
> I'm trying to convert the last four numbers of the following string
> SP1/84/056351/0406
> to a date. It should default to the 31st of the month. In the above
> case it would be 31st of April 2006. Anyone any ideas?
You want it to default to an invalid date? There are only 30 days in April.
Dan
I'm trying to convert the last four numbers of the following string
SP1/84/056351/0406
to a date. It should default to the 31st of the month. In the above
case it would be 31st of April 2006. Anyone any ideas?
declare @.str varchar(20)
set @.str = 'SP1/84/056351/0406'
declare @.month varchar(2)
declare @.year varchar(2)
set @.year = right (@.str,2)
select @.month = substring (@.str, len(@.str)-3,2)
select @.month
select @.year
select dateadd(m,1, convert(datetime,@.year+@.month+'01')) - 1
Regards
Amish Shah
|||Thank you for the help Amish
Regards
Ross
|||Thank you for the help Amish
Regards
Ross
|||rosco wrote on 6 Mar 2006 02:24:13 -0800:
> Hi,
> I'm trying to convert the last four numbers of the following string
> SP1/84/056351/0406
> to a date. It should default to the 31st of the month. In the above
> case it would be 31st of April 2006. Anyone any ideas?
You want it to default to an invalid date? There are only 30 days in April.
Dan
date query
Hi,
I'm trying to convert the last four numbers of the following string
SP1/84/056351/0406
to a date. It should default to the 31st of the month. In the above
case it would be 31st of April 2006. Anyone any ideas?declare @.str varchar(20)
set @.str = 'SP1/84/056351/0406'
declare @.month varchar(2)
declare @.year varchar(2)
set @.year = right (@.str,2)
select @.month = substring (@.str, len(@.str)-3,2)
select @.month
select @.year
select dateadd(m,1, convert(datetime,@.year+@.month+'01')) - 1
Regards
Amish Shah|||Thank you for the help Amish
Regards
Ross|||Thank you for the help Amish
Regards
Ross|||rosco wrote on 6 Mar 2006 02:24:13 -0800:
> Hi,
> I'm trying to convert the last four numbers of the following string
> SP1/84/056351/0406
> to a date. It should default to the 31st of the month. In the above
> case it would be 31st of April 2006. Anyone any ideas?
You want it to default to an invalid date? There are only 30 days in April.
Dan
I'm trying to convert the last four numbers of the following string
SP1/84/056351/0406
to a date. It should default to the 31st of the month. In the above
case it would be 31st of April 2006. Anyone any ideas?declare @.str varchar(20)
set @.str = 'SP1/84/056351/0406'
declare @.month varchar(2)
declare @.year varchar(2)
set @.year = right (@.str,2)
select @.month = substring (@.str, len(@.str)-3,2)
select @.month
select @.year
select dateadd(m,1, convert(datetime,@.year+@.month+'01')) - 1
Regards
Amish Shah|||Thank you for the help Amish
Regards
Ross|||Thank you for the help Amish
Regards
Ross|||rosco wrote on 6 Mar 2006 02:24:13 -0800:
> Hi,
> I'm trying to convert the last four numbers of the following string
> SP1/84/056351/0406
> to a date. It should default to the 31st of the month. In the above
> case it would be 31st of April 2006. Anyone any ideas?
You want it to default to an invalid date? There are only 30 days in April.
Dan
Subscribe to:
Posts (Atom)