Hi All!!
I have some php script in a program I use and I'm struggling to change it. It works fine Getting the personId for any details less than 1 day old, but I want to change it to any details less than 1 hour old. I've tried changing DATEADD(d,-1,getdate()) to DATEADD(h,-1,getdate()) and googling other things but still stumped
Any Ideas?
select
PersonId
dReceievedDate = cast(YEAR(dReceievedDate) as varchar(4))+'-'+ RIGHT(CAST(MONTH(dReceievedDate) as varchar(2)),2)+'-'+ RIGHT(CAST(DAY(dReceievedDate) as varchar(2)),2)
from
peopletbl
where dReceievedDate >DATEADD(d,-1,getdate())
order by PersonId DESC