Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
javman #1
Between Dates
I am trying to query an online access database and return records that have
occurred between dates. I am using another query which does work to produce the
start and finish dates.
<cfif isdefined ("form.Period")>
<cfquery name="PayPeriodSelect"
datasource="#Request.MainDSN#">
SELECT *
From
OilEmployeeTime
Where
(Finish Between ##PayPeriod.Start## And ##PayPeriod.Finish##);
</cfquery>
<cfdump var="#PayPeriodSelect#">
<cfdump var="#form.period#">
</cfif>
Does anyone have any ideas where i am going wrong. Thanks
javman Guest
-
Dates & SQL
In my CF form I have created a date object using #DateFormat(Now(),"MM/DD/YY")# which displays the date as: 07/29/05. When the date is inserted... -
ASP/VBS Dates Between Dates
I'm trying to filter records depending on 2 dates requested from the querystring MMColParam1 (startdate) and MMColParam2 (enddate), i.e. a list... -
Dates again
Hello all I'm having trouble getting iis to understand the UK format of dates ASP off a MS Access database I have the following query:... -
Dates
Thanks to all those who replied. I ended up doing some research myself and found a good date module at... -
Help with Dates please
Hi, In a SQL table I have a field named departure and a date in inserted in it. What is the exact syntax to get only records with a future date... -
TA-Selene #2
Re: Between Dates
Can you clarify exactly what the problem you are having is?
TA-Selene Guest
-
javman #3
Re: Between Dates
I have sort of got the date function to work.
I was using a result from another query in by date query which did not work
since I was working with a 14 day pay period I changed the query to use a form
variable.
<cfif isdefined ("form.Start")>
<cfquery name="PayPeriodSelect"
datasource="#Request.MainDSN#">
SELECT *
From
OilEmployeeTime
Where
Area Like '#Request.Area#' And (Start > #DateFormat(form.start,
"mm/dd/yyyy")#)<!--- And (Finish < #DateFormat((form.start+14),
"mm/dd/yyyy")#)--->;
</cfquery>
<cfdump var="#PayPeriodSelect#">
<cfdump var="#form.Start#">
</cfif>
This works but it does not allow the second part of the sql. When I use that i
get a syntax error
javman Guest
-
OldCFer #4
Re: Between Dates
Use #CreateODBCDate(form.start)# to pass your dates to the DB
OldCFer Guest
-
pwizzard #5
BETWEEN DATES
I have been using a piece of code in a query that works fine with Access but
not with mysql. i need to show all the records that fall between NOW() and the
next three days.
Could anyone help with the code necessary to get the same to work with mySQL.
Thanks
WHERE tblMatches.betend BETWEEN NOW() AND NOW() +3
pwizzard Guest
-



Reply With Quote

