Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-sqlserver > #1243
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Gene Wirchenko <genew@ocis.net> |
| Newsgroups | comp.databases.ms-sqlserver |
| Subject | Re: what's going on with datediff function? |
| Date | Thu, 30 Aug 2012 14:04:11 -0700 |
| Organization | A noiseless patient Spider |
| Lines | 19 |
| Message-ID | <ngkv38he5v67m4lac0c4nnpib5aigas378@4ax.com> (permalink) |
| References | <aa23cac7-3e4f-4b12-83da-562fbc9c5d25@m18g2000yqp.googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| Injection-Info | mx04.eternal-september.org; posting-host="c0a6a1dc41fc92eb7000e57afbd16211"; logging-data="22756"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+fFq6s1sNa9M4VHCZG0gn/GXLeTFRwmV4=" |
| X-Newsreader | Forte Agent 4.2/32.1118 |
| Cancel-Lock | sha1:CKHa0xnNQiuOvo7PNeCsQRq90qw= |
| Xref | csiph.com comp.databases.ms-sqlserver:1243 |
Show key headers only | View raw
On Thu, 30 Aug 2012 12:34:56 -0700 (PDT), justaguy
<lichunshen84@gmail.com> wrote:
>-- task: find records / rows where createddate is 8/23/2012
>
>select *
>from myTBL
>and datediff(dy,createddate,'8/23/2012') <1
>
>-- change parameter from dy to d does not help neither
>What's wrong?
>
>DBMS in question: MS SQL Server 2005 Express
datediff() can return negative values.
Sincerely,
Gene Wirchenko
Back to comp.databases.ms-sqlserver | Previous | Next — Previous in thread | Next in thread | Find similar
what's going on with datediff function? justaguy <lichunshen84@gmail.com> - 2012-08-30 12:34 -0700
Re: what's going on with datediff function? Gene Wirchenko <genew@ocis.net> - 2012-08-30 14:04 -0700
Re: what's going on with datediff function? "Bob Barrows" <reb01501@NOyahooSPAM.com> - 2012-09-04 11:25 -0400
Re: what's going on with datediff function? "Bob Barrows" <reb01501@NOSPAMyahoo.com> - 2012-09-05 18:47 -0400
Re: what's going on with datediff function? rja.carnegie@gmail.com - 2012-09-06 15:53 -0700
Re: what's going on with datediff function? "Bob Barrows" <reb01501@NOSPAMyahoo.com> - 2012-09-06 19:03 -0400
Re: what's going on with datediff function? "Bob Barrows" <reb01501@NOSPAMyahoo.com> - 2012-09-06 19:09 -0400
Re: what's going on with datediff function? Gene Wirchenko <genew@ocis.net> - 2012-09-06 17:20 -0700
Re: what's going on with datediff function? "Bob Barrows" <reb01501@NOSPAMyahoo.com> - 2012-09-05 18:47 -0400
Re: what's going on with datediff function? Lutz Uhlmann <news@invalid.invalid> - 2012-09-05 08:22 +0200
csiph-web