var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: How to calculate working days between two dates??
How to calculate working days between two dates??
If 2 dates are taken.
E..g Date 1--> 16/09/2204
Date 2--> 22/09/2004
How to calculate no. of working days between these 2 dates?
(i.e. Excluding Sat. & Sun.)
I tried writing UDF. But didn't got what to define in shared library can anybody help me in this problem. Also how to write FOR loop in mysql??
Try this :
SELECT datefield FROM table WHERE DATE_FORMAT(datefield, '%W') NOT IN ('Saturday', 'Sunday');
For more info on date functions, please refer to the mysql manual.
Concerning loops, you can't do that in SQL, so I think you will have to do that in an external program (C++, Java, Php... depending on your needs).