Re: [flexcoders] Query returning results based on date
when i try to hard code the date i get the correct result somewhat only that it misses a record. here is what i mean by hard coding SELECT ID_biodata, quater, datePaid, amountPaid, manFees FROM collections WHERE datePaid <= DateValue('4/20/2015 0:00:00 AM') AND ID_biodata = 1 AND quater = 'Quarter 1' ORDER BY datePaid SELECT SUM(CAST(amountPaid as INTEGER) + CAST(manFees as INTEGER)) AS currentPaid FROM qBal that bring's me closer to the right answer but i am comparing with different dates from the database so am stuck.
Re: [flexcoders] Query returning results based on date
On 4/20/2015 6:33 PM, stinas...@yahoo.com [flexcoders] wrote: > Below is my code. is there something am doing wrong? Please help. well first off you don't need the query-of-query, you can get what you want in one query. > WHERE datePaid <= value="#parseDateTime(arguments.datePaid)#"> what's datePaid look like? parseDateTime only works with en_US locale date formats. in any case, have you tried testing this in plain cf first?
[flexcoders] Query returning results based on date
Hello Guys, i am using a cfquery and am trying to return results based on date. the idea is to return entries that are less than or equal to date but am not getting any results but when i change to greater than or equal to i get the all results in databse which is wrong. Below is my code. is there something am doing wrong? Please help. SELECT ID_biodata, quater, datePaid, amountPaid, manFees FROM collections WHERE datePaid <= AND ID_biodata = AND quater = ORDER BY datePaid SELECT SUM(CAST(amountPaid as INTEGER) + CAST(manFees as INTEGER)) AS totalPaid FROM qBal