"SELECT COUNT(job_id) AS Expr1 , send_month
FROM job_master
WHERE (CONVERT(datetime, finish_date, 103) - CONVERT(datetime, send_date, 103) > 2) AND (send_year = '2010') AND (use_flag = 'y') AND (finish_flag = 'y')
group by send_month"
จากที่ทดสอบแล้วมันขึ้น error ว่า
" error '80040e57' [Microsoft][ODBC SQL Server Driver][SQL Server]Arithmetic overflow error converting expression to data type datetime. "
Datepart Abbreviations
Year = yy, yyyy
quarter = qq, q
Month = mm, m
dayofyear = dy, y
Day = dd, d
Week wk, ww
Hour = = hh
minute = mi, n
second = ss, s
millisecond = ms