Answered
Access DB Dates
I have a query that reteives dates out of an Access database.
What I am trying to do is select 1 date out of many. The query I
would like to use, looks like something as follows:
<cfset TodaysDate = #CreateODBCDate(Now())#>
<CFQUERY DATASOURCE="#DataSource#" name="GetDates">
SELECT WeekEndingDate
FROM Productivity
WHERE JobNumber = '#URL.JobNumber#' AND
SubJobNumber = '#URL.SubJobNumber#' AND
WeekEndingDate <= #TodaysDate#-7
</CFQUERY>
The dates it has to choose from is:
8-17-08
8-24-08
9-7-08
9-14-08
9-21-08
9-28-08
10-5-08
When I try:
<cfoutput query="GetDates">#DateFormat(WeekEndingDate, "medium")#<br></cfoutput>
I get all the dates. I have tried numerous formats and no luck. The dates in the database are in ODBC format currently. Any suggestions would be wonderful! Thanks in advance!
<cfset TodaysDate = #CreateODBCDate(Now())#>
<CFQUERY DATASOURCE="#DataSource#" name="GetDates">
SELECT WeekEndingDate
FROM Productivity
WHERE JobNumber = '#URL.JobNumber#' AND
SubJobNumber = '#URL.SubJobNumber#' AND
WeekEndingDate <= #TodaysDate#-7
</CFQUERY>
The dates it has to choose from is:
8-17-08
8-24-08
9-7-08
9-14-08
9-21-08
9-28-08
10-5-08
When I try:
<cfoutput query="GetDates">#DateFormat(WeekEndingDate, "medium")#<br></cfoutput>
I get all the dates. I have tried numerous formats and no luck. The dates in the database are in ODBC format currently. Any suggestions would be wonderful! Thanks in advance!
