Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-sqlserver > #1700
| X-Received | by 10.66.157.35 with SMTP id wj3mr738372pab.11.1393878905211; Mon, 03 Mar 2014 12:35:05 -0800 (PST) |
|---|---|
| X-Received | by 10.140.91.72 with SMTP id y66mr69886qgd.23.1393878905095; Mon, 03 Mar 2014 12:35:05 -0800 (PST) |
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!l13no404718iga.0!news-out.google.com!bw18ni88qab.1!nntp.google.com!hw13no5367415qab.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.databases.ms-sqlserver |
| Date | Mon, 3 Mar 2014 12:35:04 -0800 (PST) |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=69.17.145.132; posting-account=8CYOhQoAAABduuhdhqEvRULbrZIADtd9 |
| NNTP-Posting-Host | 69.17.145.132 |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <23b8614b-5839-47ec-a647-37183eb2643d@googlegroups.com> (permalink) |
| Subject | Advanced DateDiff Calculation In SQL (exclude weekend time) |
| From | andy.mcvicker@siemens.com |
| Injection-Date | Mon, 03 Mar 2014 20:35:05 +0000 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | quoted-printable |
| X-Received-Bytes | 1639 |
| X-Received-Body-CRC | 2247558748 |
| Xref | csiph.com comp.databases.ms-sqlserver:1700 |
Show key headers only | View raw
Hi Everyone I have an odd question for SQL I'm trying to do a calculation on 2 date fields. I'd like to get the exact difference in time between 2 dates but I don't want to include any time if the duration falls over a weekend. For example, find me the difference in time with the following but don't include any time after Friday at midnight to Sunday at midnight. StartDate = 03/14/2014 12:09:00pm EndDate = 03/17/2014 09:24:00am Or even more seemingly complex... StartDate = 03/14/2014 12:09:00pm EndDate = 03/24/2014 09:24:00am Best Regards, Andy
Back to comp.databases.ms-sqlserver | Previous | Next — Next in thread | Find similar
Advanced DateDiff Calculation In SQL (exclude weekend time) andy.mcvicker@siemens.com - 2014-03-03 12:35 -0800 Re: Advanced DateDiff Calculation In SQL (exclude weekend time) Ross Presser <rpresser@gmail.com> - 2014-03-03 13:38 -0800 Re: Advanced DateDiff Calculation In SQL (exclude weekend time) --CELKO-- <jcelko212@earthlink.net> - 2014-03-09 19:08 -0700 Re: Advanced DateDiff Calculation In SQL (exclude weekend time) --CELKO-- <jcelko212@earthlink.net> - 2014-03-09 19:08 -0700 Re: Advanced DateDiff Calculation In SQL (exclude weekend time) rja.carnegie@gmail.com - 2014-03-09 21:32 -0700
csiph-web