Joe,
I just sent her the answer. As you noted Date/Time fields are in seconds and
Date fields are in Days.
Lisa only needs to add 1 like EXP_DATE < ("$End Date$' + 1)
Dave
--------------------------
[EMAIL PROTECTED] (Wireless)
----- Original Message -----
From: Action Request System discussion list(ARSList) <[email protected]>
To: [email protected] <[email protected]>
Sent: Mon Jun 11 14:54:10 2007
Subject: Re: Dates in a SQL Query
**
Roger,
The 2 are not the same.. Date/Time fields are fields where the date/time is the
number of seconds since 12:00:00 AM on 1st Jan 1970 and is called Epoch Time.
See http://en.wikipedia.org/wiki/Unix_time for more details.
Date fields on the other hand however are the number of days since the noon of
1st Jan 4713 BC and is referred to as Julian Date. See
http://en.wikipedia.org/wiki/Julian_day for more details.
Lisa, I'm not too certain but I think I saw references of how to use this in
SQL statement to convert the integer into appropriate dates in one of the Admin
guides..
Joe
-----Original Message-----
From: Action Request System discussion list(ARSList) [mailto:[EMAIL
PROTECTED] Behalf Of Roger Justice
Sent: Monday, June 11, 2007 2:39 PM
To: [email protected]
Subject: Re: Dates in a SQL Query
** All date and date/time fields are stored in seconds therefore you
will have to calculate it.
-----Original Message-----
From: Kemes, Lisa
To: [email protected]
Sent: Mon, 11 Jun 2007 2:35 pm
Subject: Dates in a SQL Query
**
I have a simple count SQL query that sets a field on my form:
SELECT COUNT(SURVEY_NUMBER) from TEIS_SURVEY_CALCULATIONS Where
AVGSCORE_7 > 0
I would also like to query it more by adding date fields. I have a
start and end date on my form, but how do I translate this into at SQL Query?
I know if I simply do this:
SELECT COUNT(SURVEY_NUMBER) from TEIS_SURVEY_CALCULATIONS Where
AVGSCORE_7 > 0 and EXP_DATE >= '$Start Date$' and EXP_DATE < "$End Date$'
I'm not going to get what I need. My EXP_DATE field is truly just a
date field, not Date/Time
We are using AR System 6.3
AR User 6.0
Oracle 9i and Sun Solaris.
__20060125_______________________This posting was submitted with HTML in it___