>I just tried out the DATE() function. I never knew you could use parameters with it. I always used it as DATE().
>Thanks,
>Cecil
>
>>If you want to use different dates in the sums, use an IIF() expression as what to sum, something like:
>
>>SUM(IIF(BETWEEN(bill_date, DATE(2010,1,1), DATE(2010,1,31)), bill_prem, 0)
>
>>I also changed your CTOD() to use DATE(), which is much safer.
>
>>Tamar
An interesting fact about date() (and datetime()) is that any of the parameters can be null, which will result in the current date/time value, for example:
? DATE(YEAR(DATE()) - 1, null, null)
? DATETIME(null, null, null, 16, 0, 0)
etc.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?
"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare
"To die for a religion is easier than to live it absolutely"
Jorge L. Borges