🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #3497

Re: Can't access database with the date data type field

#3497
From: Jackie
Date: Sun, 11 Aug 2002 23:52
84 lines
2860 bytes
Hi Vassiliev

Thank for your helping , I can able to query it now.

 Many Thanks.


"Vassiliev V.V." <news@vassilievvv.mtu-net.ru> ���g��l��
news:3d561d34_1@dnews...
> When you specify the criteria argument, date literals must be in U.S.
> format, even if you are not using the U.S. version of the MicrosoftR Jet
> database engine. For example, May 10, 1996, is written 10/5/96 in the
United
> Kingdom and 5/10/96 in the United States. Be sure to enclose your date
> literals with the number sign (#) as shown in the following examples.
>
> To find records dated May 10, 1996 in a United Kingdom database, you must
> use the following SQL statement:
>
> SELECT *
>
> FROM Orders
>
> WHERE ShippedDate = #5/10/96#;
>
>
> You can also use the DateValue function which is aware of the
international
> settings established by Microsoft WindowsR. For example, use this code for
> the United States:
>
> SELECT *
>
> FROM Orders
>
> WHERE ShippedDate = DateValue('5/10/96');
>
>
> And use this code for the United Kingdom:
>
> SELECT *
>
> FROM Orders
>
> WHERE ShippedDate = DateValue('10/5/96');
>
>
>
> Regards,
>
> Vassiliev V.V.
>
> http://www.oledbdirect.com
>
>
>
> "Jackie" <tkfi@hotmail.com> ������?�������� ?�������� ��������?
> news:3d55a14f$1_2@dnews...
> > Hi All
> > I have a Access database with several table which all have a (short date
> > format) data type field , where i try to query it by execute the
following
> > SQL statement .
> >
> > Select * from table1 where dater =  31/7/2002
> > or
> > Select * from table1 where dater =  '31/7/2002'
> > or
> > Select * from table1 where dater =  #31/7/2002#
> >
> > I got nothing , I'm sure that at least one record have the date
> "31/7/2002".
> > did i do something wrong.
> >
> > Please help
> > Thanks a lot
> >
> >
> >
> >
> >
> >
>
>
Technical Details
Message-ID: <3d56f93b_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews!not-for-mail
References: <3d55a14f$1_2@dnews> <3d561d34_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10698b,47a4773167bac670
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-08-11 17:05:40 PST
From: "Jackie" <tkfi@hotmail.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3d55a14f$1_2@dnews> <3d561d34_1@dnews>
Subject: Re: Can't access database with the date data type field
Date: Mon, 12 Aug 2002 07:52:48 +0800
Lines: 86
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
NNTP-Posting-Host: 202.175.77.241
Message-ID: <3d56f93b_1@dnews>
X-Trace: dnews 1029110075 202.175.77.241 (11 Aug 2002 16:54:35 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews!not-for-mail