Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: date field

Geek News

date field
Jean-Paul <jp.dewinter[ at ]telenet.be> 11/21/2008 10:49:16 AM
Hi,
Have following problem:
When I enter a date in a field and base my query upon this field, I get
no result.
I noticed, when I enter a date like 01/05/08 (the format=dd/mm/yy) acces
actually stores it like 010508, so in the query, of course I get no
results because I think the query doesn't see this like a date.

How to solve this?
Thanks
Re: date field
"Douglas J. Steele" <NOSPAM_djsteele[ at ]NOSPAM_gmail.com> 11/21/2008 11:52:57 AM
Sounds as though you're storing the date in a text field, not a date field,
and that you're using an input mask.

If you were storing the date in a date field, it would be stored as an eight
byte floating point number, where the integer portion represents the date as
the number of days relative to 30 Dec, 1899 and the decimal portion
represents the time as a fraction of a day. For instance, 01 May, 2008 would
be stored as 39569. By doing that, the format doesn't enter into it.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Jean-Paul" <jp.dewinter[ at ]telenet.be> wrote in message
news:MmwVk.32$cy5.28[ at ]newsfe22.ams2...
[Quoted Text]
> Hi,
> Have following problem:
> When I enter a date in a field and base my query upon this field, I get no
> result.
> I noticed, when I enter a date like 01/05/08 (the format=dd/mm/yy) acces
> actually stores it like 010508, so in the query, of course I get no
> results because I think the query doesn't see this like a date.
>
> How to solve this?
> Thanks


Re: date field
Jean-Paul <jp.dewinter[ at ]telenet.be> 11/21/2008 12:16:57 PM
The field is unbound.....
I created a form with 2 entryfields, added a pushbutton which runs a
query based upon the values of the 2 (date) entryfields.
JP

Douglas J. Steele wrote:
[Quoted Text]
> Sounds as though you're storing the date in a text field, not a date field,
> and that you're using an input mask.
>
> If you were storing the date in a date field, it would be stored as an eight
> byte floating point number, where the integer portion represents the date as
> the number of days relative to 30 Dec, 1899 and the decimal portion
> represents the time as a fraction of a day. For instance, 01 May, 2008 would
> be stored as 39569. By doing that, the format doesn't enter into it.
>
RE: date field
Tieske 11/21/2008 1:00:01 PM
you might also want to check this out regarding dates and SQL:
http://www.mvps.org/access/datetime/date0005.htm

regards
Tieske

"Jean-Paul" wrote:

[Quoted Text]
> Hi,
> Have following problem:
> When I enter a date in a field and base my query upon this field, I get
> no result.
> I noticed, when I enter a date like 01/05/08 (the format=dd/mm/yy) acces
> actually stores it like 010508, so in the query, of course I get no
> results because I think the query doesn't see this like a date.
>
> How to solve this?
> Thanks
>
Re: date field
"Douglas J. Steele" <NOSPAM_djsteele[ at ]NOSPAM_gmail.com> 11/21/2008 11:18:05 PM
What's the query?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Jean-Paul" <jp.dewinter[ at ]telenet.be> wrote in message
news:XExVk.64953$AB7.52626[ at ]newsfe09.ams2...
[Quoted Text]
> The field is unbound.....
> I created a form with 2 entryfields, added a pushbutton which runs a query
> based upon the values of the 2 (date) entryfields.
> JP
>
> Douglas J. Steele wrote:
>> Sounds as though you're storing the date in a text field, not a date
>> field, and that you're using an input mask.
>>
>> If you were storing the date in a date field, it would be stored as an
>> eight byte floating point number, where the integer portion represents
>> the date as the number of days relative to 30 Dec, 1899 and the decimal
>> portion represents the time as a fraction of a day. For instance, 01 May,
>> 2008 would be stored as 39569. By doing that, the format doesn't enter
>> into it.
>>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net