I am trying to see a week worth of modified data in my oracle database and I have a field contains modifying date.
I wrote the code but the result is strange: It is just using the "day" as a criteria, In other words when I say -7 it is going and finding all data for 7 days but for all years not for the just 7 days for 2002. Lets say today 7th, it is going extracting data from all years (31st to 7th) not just for 2002.
Can someone tell me what is going on in this code:
_______________________________________________________
<cfset weekago=#LSdateFormat(DateAdd('d',-7,now()), "mm/dd/yyyy"#&' '&#TimeFormat(Now(), "h:m:ss"#>
<cfset today=#LSdateFormat(Now(), "mm/dd/yyyy"#&' '&#TimeFormat(Now(), "h:m:ss"#>
<cfquery datasource="datacat1" name="park">
SELECT Dataset_ID, modifiedon
from Parkcode_xREF
where modifiedon between '#weekago#' and '#today#'
order by dataset_ID
</cfquery>
______________________________________________________
Thanks for help.
I wrote the code but the result is strange: It is just using the "day" as a criteria, In other words when I say -7 it is going and finding all data for 7 days but for all years not for the just 7 days for 2002. Lets say today 7th, it is going extracting data from all years (31st to 7th) not just for 2002.
Can someone tell me what is going on in this code:
_______________________________________________________
<cfset weekago=#LSdateFormat(DateAdd('d',-7,now()), "mm/dd/yyyy"#&' '&#TimeFormat(Now(), "h:m:ss"#>
<cfset today=#LSdateFormat(Now(), "mm/dd/yyyy"#&' '&#TimeFormat(Now(), "h:m:ss"#>
<cfquery datasource="datacat1" name="park">
SELECT Dataset_ID, modifiedon
from Parkcode_xREF
where modifiedon between '#weekago#' and '#today#'
order by dataset_ID
</cfquery>
______________________________________________________
Thanks for help.