Dear All,
May i know how to write in case when to show the result ?
example, if datediff result is more than 13 hour, then the actual result i want is fix in 12 hour only.
KINDLY ADVISE, THANK YOU
Case when FIRSTSCAN.EP_SCAN_DATE > 13 hour
then show 12 hour only
DATEDIFF(HOUR,(CONVERT(VARCHAR(14),stuff(stuff(FIRSTSCAN.EP_SCAN_DATE,9,0,SHIFTDESC.EP_SHIFT_TIMEFR),9,0,' '),112)) ,CONVERT(varchar(14),stuff(LASTSCAN.EP_SCAN_DATE,12,0,':'),112)))END as datetimetest