dbTalk Databases Forums  

DATE/TIME STAMP QUERY

comp.databases.paradox comp.databases.paradox


Discuss DATE/TIME STAMP QUERY in the comp.databases.paradox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dan
 
Posts: n/a

Default DATE/TIME STAMP QUERY - 08-15-2006 , 05:40 PM






I am trying to query the date/time field. If I paste the value "11:00:00
PM, 8/19/2006" into the query, I don't get a result, but comes back with
error, "Missing comma". I have tried to place quotes around with no success.
What is the proper format to enter into querys date/time field to get a
result?

Thanks
Dan



Reply With Quote
  #2  
Old   
Dennis Santoro
 
Posts: n/a

Default Re: DATE/TIME STAMP QUERY - 08-15-2006 , 06:16 PM






Try using a criteria table instead. If you are not sure how, see the faq on it
at thedbcommunity.com or http://mirwin.homestead.com/Paradox.html

Denn Santoro
President
Resource Development Associates
http://www.RDAWorldWide.Com
Offices in the United States and Germany
Providing solutions to health care, business, governments and non-profits since
1982



Reply With Quote
  #3  
Old   
Bertil Isberg
 
Posts: n/a

Default Re: DATE/TIME STAMP QUERY - 08-16-2006 , 03:57 AM



Dan

From an old Borland documment

http://hem.bredband.net/bertilisberg...ond/bid717.htm

Q: HOW CAN I QUERY A TIME OR TIMESTAMP FIELD?

A: To query a timestamp field, the format you type in the data has to
meet these criteria:

Time must always be queried as military time (24 hour clock). It must
have no AM/PM specification, and seconds must be included.

The date must precede the time.

The date and time must be separated with a space, not with a comma.
Also, quotes cannot be used.

For example: 10/25/94 13:16:22 The comparison operators work on just a
date value typed in (such as >= 1/1/94), but do not work if you type in
just time. When you type in just time in conjunction with a comparison
operator, the greater-than symbol returns all the records and the
less-than symbol returns no records.

For example: If you wanted to query all the entries on September 1, 1994
you could do this in of two ways:

Quote:
8/30/94 23:59:59, < 9/2/94 0:00:00
OR
8/30/94, < 9/2/94
Wildcard operators cannot be used in a timestamp field.

Paradox will query according to how you have your date format set in the
BDE Configuration Utility (or BDE\IDAPI\ODAPI Configuration Utility). By
default the date format is MM/DD/YY (mode 0). If you specify anything
other than mode 0 in your IDAPI settings, you must use that date format
in your query. Also, if Leading Zeros is set to True in the BDE
settings, you must use leading zeros in your query. If the query fails,
check your BDE settings.



--
Bertil Isberg
CTECH
Paradox Buglist: http://hem.bredband.net/bertilisberg/

remove spamfilter (reversed) to reply


Reply With Quote
  #4  
Old   
Dan
 
Posts: n/a

Default Re: DATE/TIME STAMP QUERY - 08-16-2006 , 07:08 AM



Thanks Bertil. This looks like what I need.

Dan
"Bertil Isberg" <bertil.isberg (AT) retlifmapsSCB (DOT) se> wrote

Quote:
Dan

From an old Borland documment

http://hem.bredband.net/bertilisberg...ond/bid717.htm

Q: HOW CAN I QUERY A TIME OR TIMESTAMP FIELD?

A: To query a timestamp field, the format you type in the data has to meet
these criteria:

Time must always be queried as military time (24 hour clock). It must have
no AM/PM specification, and seconds must be included.

The date must precede the time.

The date and time must be separated with a space, not with a comma. Also,
quotes cannot be used.

For example: 10/25/94 13:16:22 The comparison operators work on just a
date value typed in (such as >= 1/1/94), but do not work if you type in
just time. When you type in just time in conjunction with a comparison
operator, the greater-than symbol returns all the records and the
less-than symbol returns no records.

For example: If you wanted to query all the entries on September 1, 1994
you could do this in of two ways:

8/30/94 23:59:59, < 9/2/94 0:00:00
OR
8/30/94, < 9/2/94

Wildcard operators cannot be used in a timestamp field.

Paradox will query according to how you have your date format set in the
BDE Configuration Utility (or BDE\IDAPI\ODAPI Configuration Utility). By
default the date format is MM/DD/YY (mode 0). If you specify anything
other than mode 0 in your IDAPI settings, you must use that date format in
your query. Also, if Leading Zeros is set to True in the BDE settings, you
must use leading zeros in your query. If the query fails, check your BDE
settings.



--
Bertil Isberg
CTECH
Paradox Buglist: http://hem.bredband.net/bertilisberg/

remove spamfilter (reversed) to reply



Reply With Quote
  #5  
Old   
marco
 
Posts: n/a

Default Re: DATE/TIME STAMP QUERY - 08-17-2006 , 11:29 AM



Dan wrote:
Quote:
Thanks Bertil. This looks like what I need.

Dan
"Bertil Isberg" <bertil.isberg (AT) retlifmapsSCB (DOT) se> wrote in message
news:44e2de36$1 (AT) pnews (DOT) thedbcommunity.com...

Dan

From an old Borland documment

http://hem.bredband.net/bertilisberg...ond/bid717.htm

Q: HOW CAN I QUERY A TIME OR TIMESTAMP FIELD?

A: To query a timestamp field, the format you type in the data has to meet
these criteria:

Time must always be queried as military time (24 hour clock). It must have
no AM/PM specification, and seconds must be included.

The date must precede the time.

The date and time must be separated with a space, not with a comma. Also,
quotes cannot be used.

For example: 10/25/94 13:16:22 The comparison operators work on just a
date value typed in (such as >= 1/1/94), but do not work if you type in
just time. When you type in just time in conjunction with a comparison
operator, the greater-than symbol returns all the records and the
less-than symbol returns no records.

For example: If you wanted to query all the entries on September 1, 1994
you could do this in of two ways:


8/30/94 23:59:59, < 9/2/94 0:00:00

OR

8/30/94, < 9/2/94

Wildcard operators cannot be used in a timestamp field.

Paradox will query according to how you have your date format set in the
BDE Configuration Utility (or BDE\IDAPI\ODAPI Configuration Utility). By
default the date format is MM/DD/YY (mode 0). If you specify anything
other than mode 0 in your IDAPI settings, you must use that date format in
your query. Also, if Leading Zeros is set to True in the BDE settings, you
must use leading zeros in your query. If the query fails, check your BDE
settings.

and windows regional settings



Quote:


--
Bertil Isberg
CTECH
Paradox Buglist: http://hem.bredband.net/bertilisberg/

remove spamfilter (reversed) to reply




Reply With Quote
  #6  
Old   
Dennis Santoro
 
Posts: n/a

Default Re: DATE/TIME STAMP QUERY - 08-17-2006 , 04:15 PM



Still easier to use a criteria table.....

Denn Santoro
President
Resource Development Associates
http://www.RDAWorldWide.Com
Offices in the United States and Germany
Providing solutions to health care, business, governments and non-profits since
1982



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.