Viewing 15 posts - 1 through 15 (of 81 total)
also got solution for this one as well
select ID,
CONVERT(varchar(20),LOADDATE,101) as [Date],
CASE WHEN CAST(LOADDATE AS TIME) > '8:59:59' THEN CONVERT(varchar(20),LOADDATE,101)
ELSE CONVERT(varchar(20),DATEADD(DAY,-1,LOADDATE),101) END AS [NewDate],
CAST(LOADDATE AS TIME) as time
from #temp
March 25, 2022 at 2:43 pm
below is to get business hours data
SELECT *
FROM #TEMP
WHERE CAST(LOADDATE AS TIME) BETWEEN '9:00:00' AND '17:59:59'
Thanks for your help
March 25, 2022 at 2:42 pm
Basically actual ask is,
we need to display the date, and rule is the time rage is 9AM to 8:59AM,
<!--more-->
CREATE TABLE #TEMP
(ID INT, LOADDATE DATETIME)
INSERT INTO #TEMP
SELECT 1,'2022-03-24...
March 24, 2022 at 5:40 pm
I think this might solve this
SELECT *
FROM #TEMP
WHERE cast(LOADDATE as time) BETWEEN '9:00' AND '17:00'
March 24, 2022 at 5:28 pm
I did tried some, but didn't got desired output what i am looking for.
Thanks!
March 24, 2022 at 5:08 pm
Thanks Guys,
It helps me to develop in my logic.
July 11, 2019 at 3:10 pm
Thanks for your reply,
The First Column need to have only one Value before comma, and rest it need to go to other column.
July 11, 2019 at 2:33 pm
Thanks Guys for helping out to build this.
Appreciate your effort.
March 28, 2019 at 10:41 am
will do the trick here - but...
March 16, 2018 at 7:09 am
Yes, I understand completely. Took an hours to get it.
Will break in temp tables and do the updates.
My next step is open up for all records, will test...
March 7, 2018 at 8:41 pm
March 7, 2018 at 5:49 pm
Viewing 15 posts - 1 through 15 (of 81 total)