Hello - Using Crystal 11, SQL database. I have a datetime field that I would like to multiply by a number to arrive at the future date. Is this possible? Thanks in advance for any suggestions.
Hi - I did as suggested and an error was returned "the number of days is out of range". I have a formula to extract the date from a datetime field. The formula you suggested looks like this (@date) + 7 * (Employee.BenefitDuration).
Thanks for the prompt reply. I am using a datetime field. My formula for (@date) is date(Employee.HireDate). The formula is converting the datetime field of (Employee.HireDate) to a date field.
what are the contents of the @Date formula?
knowing that might be helpful.
Also, just because i am sorta OCD on these things and want to make certain the operator logic is clear, i would write the same formula you used like this: {@date} + (7 * {Employee.BenefitDuration})
as long as all the values are dates, i am not seeing why Skip's formula would fail.
is it possible the field {Employee.HireDate} could have values that are invalid as dates?
that would be my first guess.
add something like this to the start of your date formula:
IF isdate({Employee.Hiredate})=TRUE then date({Employee.HireDate}) else dateserial(1900,01,01)
you can then filter out any dates that are equal to 01/01/1900 (and/or inform end users to fix the dates or whatever)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.