Link to home
Start Free TrialLog in
Avatar of mari_carmen
mari_carmen

asked on

Crystal Reports 7

I am trying to do weekly reports using the FullLastWeek function. The problem is Crystal Reports doesn't recognised the date variable because it is in the wrong format, the problem is I can't seem to find what format the date is supposed to be in.

1. Do you know what the date format is suppsed to be?

2. If my variable is not in the correct format (which I cannot change now) is there a way in Crystal Reports that I can change the format of the date?

3. If number 3 above cannot be done, is there a work around to find the ranges between 2 dates (if the only date formats I am using is YYYYMMDD and DD/MM/YYYY), which I can report on.

Thanks

Mari
Avatar of ramaswamy_ravi
ramaswamy_ravi

Mari,

Did you try using the Date functions for example, if you have a varibale @X as "21/10/99" you can create a formula @Y as follows:

Date(Val(Right({@X}, 4)), Val(Mid({@X}, 4, 2)), Val(Left({@X}, 2)))

I hope this is what you want. Please let me know.

Ravi

Avatar of mari_carmen

ASKER

Could you just explain a little further in how this formula works.

Thanks

Mari
ASKER CERTIFIED SOLUTION
Avatar of ramaswamy_ravi
ramaswamy_ravi

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Just what i needed, thanks.

Mari