Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Erland Sommarskog Newsgroups: microsoft.public.sqlserver.programming Subject: Re: How to add a datetime column for a 24 hour period Date: Thu, 26 Oct 2017 20:58:26 +0200 Organization: Erland Sommarskog Lines: 8 Message-ID: References: <9ebb76da-7445-4b19-a786-49e159c79594@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Info: reader02.eternal-september.org; posting-host="08662bffeee648e95705855131d3b702"; logging-data="28657"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19KR2ytlMmnq2s3WPt1bITc" User-Agent: Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32) Cancel-Lock: sha1:keLQqDrv301lBypLAwwkbI7/e3U= Xref: csiph.com microsoft.public.sqlserver.programming:31336 Mike Arney (mikespcnet.net@gmail.com) writes: > How can I get the last 24 hours of "OnTime" from "NOW"? > Timestamp > dateadd(HOUR, -24, sysdatetime()) -- Erland Sommarskog, Stockholm, esquel@sommarskog.se