Sunday, February 12, 2012

Calculating Dates

I'm not sure if this is possible or not.

I have two date fields that I want to show the difference between. However I have another table linked with this report that has the calendar date and marks each date with a number 1 if it's a work day, number 2 if it's a weekend, number 3 if it's a holiday etc. Does anyone know of a way that I can show the difference between date1 and date2 for each record counting only the work days?

Please help!!
Thanks,
Babs827So just count the number of 1s in the other table between the two dates, e.g. in a subreport.|||What database you are using? Because in MySQL there's a function DATEDIFF which will solve your problem|||Really? MYSQL's DateDiff knows about his rules for holidays etc?
Wow!
:) :) :)|||Not exactly that way but you can create a table for holidays then make a views. MySQL can determine the date if it's saturday or sunday. Now you can use the Crystal for making a function.

What database you are using?

No comments:

Post a Comment