Showing posts with label alli. Show all posts
Showing posts with label alli. Show all posts

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

Tuesday, March 27, 2012

Date Query Plz Help

Hello All
I am stuck in silly point Please help me and excuse me for a bad
Knowledege
of SQL store Procedurte Programming.
My date are store in DB as 10/17/2005 5:37:07 PM
How Do I fetch the Name of month from this.
Thanking You
With regards
Tarun Sinhaselect datename(month,getdate())
HTH. Ryan
<tarun.sinha@.gmail.com> wrote in message
news:1143020683.081697.80810@.i39g2000cwa.googlegroups.com...
> Hello All
> I am stuck in silly point Please help me and excuse me for a bad
> Knowledege
> of SQL store Procedurte Programming.
> My date are store in DB as 10/17/2005 5:37:07 PM
> How Do I fetch the Name of month from this.
>
> Thanking You
> With regards
> Tarun Sinha
>|||Hello Dear
Thanks for replying me so soon
I have a number of Date in DB let say,
Code Userid AssigningDate
fjjfjsddj 14 10/17/2005 5:37:07 PM
fjjfjsddj 14 10/17/2005 5:37:07 PM
fjjfjsddj 14 11/17/2005 5:37:07 PM
fjjfjsddj 14 11/17/2005 5:37:07 PM
fjjfjsddj 14 11/17/2005 5:37:07 PM
fjjfjsddj 12 9/17/2005 5:37:07 PM
fjjfjsddj 11 9/17/2005 5:37:07 PM
Now I want to Fetch all Those User Whose falls on same Month.
and also want to Know the Name of Month.
very Obiligied for You
With regards
Tarun Sinha|||select DATENAME(month,AssigningDate), * from tablename
WHERE DATENAME(month,AssigningDate) = 'March'
HTH. Ryan
<tarun.sinha@.gmail.com> wrote in message
news:1143021721.983590.131880@.t31g2000cwb.googlegroups.com...
> Hello Dear
>
> Thanks for replying me so soon
> I have a number of Date in DB let say,
> Code Userid AssigningDate
> fjjfjsddj 14 10/17/2005 5:37:07 PM
> fjjfjsddj 14 10/17/2005 5:37:07 PM
> fjjfjsddj 14 11/17/2005 5:37:07 PM
> fjjfjsddj 14 11/17/2005 5:37:07 PM
> fjjfjsddj 14 11/17/2005 5:37:07 PM
> fjjfjsddj 12 9/17/2005 5:37:07 PM
> fjjfjsddj 11 9/17/2005 5:37:07 PM
>
> Now I want to Fetch all Those User Whose falls on same Month.
> and also want to Know the Name of Month.
>
> very Obiligied for You
> With regards
> Tarun Sinha
>|||Thank You dear
You Help me a lot ..
With regards
Tarun Sinha

Date Query

Hi all:

I am trying to get data that wasn't used in the last six month. Created_on (date field)

select Category_tree_value, Created_on from workitem
where Created_on (field was used from the last six months)

Created_on format (2005-10-01 00:00:00.000)

Thanking everyone in advance.

LystraTry

where Created_on < DateAdd(Month, -6, GetDate())

Thursday, March 22, 2012

Date parameter format

Hi All
I am using this formula
ToText({HECO_SP_GMWOUT_GROSS.DD},"MM/dd/yy") in ({?StartDate} to {?EndDate})
in Record selection formula for startdate and enddate parametrs, i need date format like this "MM/DD/YY".
And it throws me error like " "Bad Number format string"
Any solution please.
Thank youtry something like this:
CStr({HECO_SP_GMWOUT_GROSS.DD}, "yyyy MMM dd, dddd");

in ur case i guess it would be
CStr({HECO_SP_GMWOUT_GROSS.DD}, "MM/dd/yy");|||Hi Niro,
Thank you for ur reply but it still showing same error.
is there any other way.
Thankyou.|||which format are you sending parameter values?
You can also try using procedure that does the filtering and design the report based on that procedure|||I guess your start and end date parameters are strings (which happen to be dates in MM/dd/yy format) and your database column is a date?
Try converting your parameters into dates rather than your date into a string.

{HECO_SP_GMWOUT_GROSS.DD} in CDate({?StartDate}) to CDate({?EndDate})

You may need to use CDateTime instead of CDate, depending on the DD datatype.

You should also test the parameters using IsDate first.

Tuesday, February 14, 2012

Date and time

Hello all!
I want to create a time stamp based on the system date and system
time. The format of my timestamp should be YYYYMMDDhhmmss.
YYYY year
MM month
DD day
hh hours
mm minutes
ss seconds
Does anyone have a clue on how can I do this?
Thanks in advance,
Hugo MadureiraHere's an example:
DECLARE @.i datetime
SET @.i = CURRENT_TIMESTAMP
SELECT CONVERT(varchar(8), @.i, 112) + REPLACE(CONVERT(varchar(8), @.i, 108),
':', SPACE(0))
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Hugo Madureira" <hugomadureira@.hotmail.com> wrote in message
news:uhptUrejFHA.2644@.TK2MSFTNGP09.phx.gbl...
Hello all!
I want to create a time stamp based on the system date and system
time. The format of my timestamp should be YYYYMMDDhhmmss.
YYYY year
MM month
DD day
hh hours
mm minutes
ss seconds
Does anyone have a clue on how can I do this?
Thanks in advance,
Hugo Madureira|||Thanks a lot, it worked. That would have take me days to find that out.
Narayana Vyas Kondreddi wrote:
> Here's an example:
> DECLARE @.i datetime
> SET @.i = CURRENT_TIMESTAMP
> SELECT CONVERT(varchar(8), @.i, 112) + REPLACE(CONVERT(varchar(8), @.i, 108)
,
> ':', SPACE(0))
>|||Hi
If you use the normal datetime datatype and getdate() to populate a default.
This can then be displayed in whatever format is require on the client. If
really necessary you can use
REPLACE(REPLACE(REPLACE(CONVERT(char(19)
,mydate,120),'-'.''),SPACE(1),''),':
','') to get YYYYMMDDHHMISS format.
John
"Hugo Madureira" wrote:

> Hello all!
> I want to create a time stamp based on the system date and system
> time. The format of my timestamp should be YYYYMMDDhhmmss.
> YYYY year
> MM month
> DD day
> hh hours
> mm minutes
> ss seconds
> Does anyone have a clue on how can I do this?
> Thanks in advance,
> Hugo Madureira
>