laurastreng
Board Regular
- Joined
- Apr 1, 2004
- Messages
- 58
Hi-
I am trying to convert a query that I run in AQT that uses this date calculation to pull back rows where the time span between the two dates is =>62 days, and that resulting date is => current date.
Here is the code in my sql query:
AND (Date(TMD1.D_REQUEST + 62 Days)>= Current Date)
I have been trying to work with DateAdd and/or DateDiff but what I end up with is old dates along with the records I actually want
examples of my useless uses
I pare down the possible results right now by stating that D_REQUEST is > 03/01/11 but I don't really want do this - but this is bonus if I can change that date need. I can make it a date prompt I suppose....... but again, that's not my priority right now.
62DaysPostReqDt: DateAdd("d",62,[D_REQUEST])
#DaysUntil62Days: DateDiff("d",Date(),[D_REQUEST]+62)
You who are more savvy than I can see how I'd return negative numbers and old dates in addition to dates that are >=Date()
How do I work in the sql
AND (Date(TMD1.D_REQUEST + 62 Days)>= Current Date)
into the Access code? So that the date resulting from adding 62 days to the date in D_REQUEST is => Date()
Thank you in advance!
Laura
I am trying to convert a query that I run in AQT that uses this date calculation to pull back rows where the time span between the two dates is =>62 days, and that resulting date is => current date.
Here is the code in my sql query:
AND (Date(TMD1.D_REQUEST + 62 Days)>= Current Date)
I have been trying to work with DateAdd and/or DateDiff but what I end up with is old dates along with the records I actually want
examples of my useless uses
I pare down the possible results right now by stating that D_REQUEST is > 03/01/11 but I don't really want do this - but this is bonus if I can change that date need. I can make it a date prompt I suppose....... but again, that's not my priority right now.
62DaysPostReqDt: DateAdd("d",62,[D_REQUEST])
#DaysUntil62Days: DateDiff("d",Date(),[D_REQUEST]+62)
You who are more savvy than I can see how I'd return negative numbers and old dates in addition to dates that are >=Date()
How do I work in the sql
AND (Date(TMD1.D_REQUEST + 62 Days)>= Current Date)
into the Access code? So that the date resulting from adding 62 days to the date in D_REQUEST is => Date()
Thank you in advance!
Laura