$strSQL1 = "SELECT * , convert(varchar,Lt1, 103) as Dw, convert(varchar,Lt1, 108) as wsT, convert(varchar,Lt2, 108) as weT FROM EM_logtime where Lt0 = '$_POST[Lt0]' AND (convert(varchar,Lt1, 103) BETWEEN '$_POST[Lt1d]' AND '$_POST[Lt2d]') order by Lt1 DESC";
// $_POST[Lt1d], $_POST[Lt2d] ต้องเป็นรูปแบบ dd/mm/YYYY น่ะครับ
$strSQL1 = "SELECT * , convert(varchar,Lt1, 103) as Dw, convert(varchar,Lt1, 108) as wsT,
convert(varchar,Lt2, 108) as weT FROM EM_logtime where Lt0 = '$_POST[Lt0]'
AND Lt1 BETWEEN convert(datetime, '$_POST[Lt1d]', 103)
AND convert(datetime, '$_POST[Lt2d]', 103) order by Lt1 DESC";