Criteria in a calculated field

G

Guest

I have a calculated field that is adding 180 days to my date. I want the
query to return only certain dates. I used the Between [Start] And [End]
criteria under my calculated field but it is returning items with dates
between the start and end of the original date, not of the caclulated field.
How do I get the query to return dates after it has added the 180 days?
 
G

Guest

Field: [Date] DCount: [Date] + 180
criteria: Between [Start date:] And [End date:]

Is this what you needed to see?

Ofer Cohen said:
Can you post your SQL?

--
Good Luck
BS"D


jlw said:
I have a calculated field that is adding 180 days to my date. I want the
query to return only certain dates. I used the Between [Start] And [End]
criteria under my calculated field but it is returning items with dates
between the start and end of the original date, not of the caclulated field.
How do I get the query to return dates after it has added the 180 days?
 
J

John Spencer

Please copy and post the SQL of your query.

(Possibly unneeded instructions follow)
Open the query
Select View:Sql from the Menu
Select all the text
Copy it
Paste it into the message

jlw said:
Field: [Date] DCount: [Date] + 180
criteria: Between [Start date:] And [End date:]

Is this what you needed to see?

Ofer Cohen said:
Can you post your SQL?

--
Good Luck
BS"D


jlw said:
I have a calculated field that is adding 180 days to my date. I want
the
query to return only certain dates. I used the Between [Start] And
[End]
criteria under my calculated field but it is returning items with dates
between the start and end of the original date, not of the caclulated
field.
How do I get the query to return dates after it has added the 180 days?
 
G

Guest

Thanks the instructions were needed.

SELECT [SAB Caseload Tracking].CSN, [SAB Caseload Tracking].[Case Name],
[SAB Caseload Tracking].[ASSIGNMENT TYPES], [SAB Caseload Tracking].[CF
Date], [SAB Caseload Tracking].[PAL Date], [SAB Caseload Tracking].[Current
Location], [SAB Caseload Tracking].Team, [CF Date]+180 AS [180 Mark], [SAB
Caseload Tracking].Comments
FROM [SAB Caseload Tracking]
WHERE ((([SAB Caseload Tracking].[PAL Date]) Is Null) AND (([CF Date]+180)
Between [Start date:] And [End date:]));


John Spencer said:
Please copy and post the SQL of your query.

(Possibly unneeded instructions follow)
Open the query
Select View:Sql from the Menu
Select all the text
Copy it
Paste it into the message

jlw said:
Field: [Date] DCount: [Date] + 180
criteria: Between [Start date:] And [End date:]

Is this what you needed to see?

Ofer Cohen said:
Can you post your SQL?

--
Good Luck
BS"D


:

I have a calculated field that is adding 180 days to my date. I want
the
query to return only certain dates. I used the Between [Start] And
[End]
criteria under my calculated field but it is returning items with dates
between the start and end of the original date, not of the caclulated
field.
How do I get the query to return dates after it has added the 180 days?
 
G

Guest

Try this SQL in a new query
SELECT [SAB Caseload Tracking].CSN, [SAB Caseload Tracking].[Case Name],
[SAB Caseload Tracking].[ASSIGNMENT TYPES], [SAB Caseload Tracking].[CF
Date], [SAB Caseload Tracking].[PAL Date], [SAB Caseload Tracking].[Current
Location], [SAB Caseload Tracking].Team, [CF Date]+180 AS [180 Mark], [SAB
Caseload Tracking].Comments
FROM [SAB Caseload Tracking]
WHERE [SAB Caseload Tracking].[PAL Date] Is Null AND DateAdd("d",180,[CF
Date]) Between CVDate([Start date:]) And CVDate([End date:])


--
Good Luck
BS"D


jlw said:
Thanks the instructions were needed.

SELECT [SAB Caseload Tracking].CSN, [SAB Caseload Tracking].[Case Name],
[SAB Caseload Tracking].[ASSIGNMENT TYPES], [SAB Caseload Tracking].[CF
Date], [SAB Caseload Tracking].[PAL Date], [SAB Caseload Tracking].[Current
Location], [SAB Caseload Tracking].Team, [CF Date]+180 AS [180 Mark], [SAB
Caseload Tracking].Comments
FROM [SAB Caseload Tracking]
WHERE ((([SAB Caseload Tracking].[PAL Date]) Is Null) AND (([CF Date]+180)
Between [Start date:] And [End date:]));


John Spencer said:
Please copy and post the SQL of your query.

(Possibly unneeded instructions follow)
Open the query
Select View:Sql from the Menu
Select all the text
Copy it
Paste it into the message

jlw said:
Field: [Date] DCount: [Date] + 180
criteria: Between [Start date:] And [End date:]

Is this what you needed to see?

:

Can you post your SQL?

--
Good Luck
BS"D


:

I have a calculated field that is adding 180 days to my date. I want
the
query to return only certain dates. I used the Between [Start] And
[End]
criteria under my calculated field but it is returning items with dates
between the start and end of the original date, not of the caclulated
field.
How do I get the query to return dates after it has added the 180 days?
 
G

Guest

Great, that worked. Thank you!!!!!!

Ofer Cohen said:
Try this SQL in a new query
SELECT [SAB Caseload Tracking].CSN, [SAB Caseload Tracking].[Case Name],
[SAB Caseload Tracking].[ASSIGNMENT TYPES], [SAB Caseload Tracking].[CF
Date], [SAB Caseload Tracking].[PAL Date], [SAB Caseload Tracking].[Current
Location], [SAB Caseload Tracking].Team, [CF Date]+180 AS [180 Mark], [SAB
Caseload Tracking].Comments
FROM [SAB Caseload Tracking]
WHERE [SAB Caseload Tracking].[PAL Date] Is Null AND DateAdd("d",180,[CF
Date]) Between CVDate([Start date:]) And CVDate([End date:])


--
Good Luck
BS"D


jlw said:
Thanks the instructions were needed.

SELECT [SAB Caseload Tracking].CSN, [SAB Caseload Tracking].[Case Name],
[SAB Caseload Tracking].[ASSIGNMENT TYPES], [SAB Caseload Tracking].[CF
Date], [SAB Caseload Tracking].[PAL Date], [SAB Caseload Tracking].[Current
Location], [SAB Caseload Tracking].Team, [CF Date]+180 AS [180 Mark], [SAB
Caseload Tracking].Comments
FROM [SAB Caseload Tracking]
WHERE ((([SAB Caseload Tracking].[PAL Date]) Is Null) AND (([CF Date]+180)
Between [Start date:] And [End date:]));


John Spencer said:
Please copy and post the SQL of your query.

(Possibly unneeded instructions follow)
Open the query
Select View:Sql from the Menu
Select all the text
Copy it
Paste it into the message

Field: [Date] DCount: [Date] + 180
criteria: Between [Start date:] And [End date:]

Is this what you needed to see?

:

Can you post your SQL?

--
Good Luck
BS"D


:

I have a calculated field that is adding 180 days to my date. I want
the
query to return only certain dates. I used the Between [Start] And
[End]
criteria under my calculated field but it is returning items with dates
between the start and end of the original date, not of the caclulated
field.
How do I get the query to return dates after it has added the 180 days?
 
G

Guest

Your welcome.
Just for future reference, check the DateAdd function to add days, weeks,
months etc to the date filed.
Also, the CVDate convert a value in to a date.

--
Good Luck
BS"D


jlw said:
Great, that worked. Thank you!!!!!!

Ofer Cohen said:
Try this SQL in a new query
SELECT [SAB Caseload Tracking].CSN, [SAB Caseload Tracking].[Case Name],
[SAB Caseload Tracking].[ASSIGNMENT TYPES], [SAB Caseload Tracking].[CF
Date], [SAB Caseload Tracking].[PAL Date], [SAB Caseload Tracking].[Current
Location], [SAB Caseload Tracking].Team, [CF Date]+180 AS [180 Mark], [SAB
Caseload Tracking].Comments
FROM [SAB Caseload Tracking]
WHERE [SAB Caseload Tracking].[PAL Date] Is Null AND DateAdd("d",180,[CF
Date]) Between CVDate([Start date:]) And CVDate([End date:])


--
Good Luck
BS"D


jlw said:
Thanks the instructions were needed.

SELECT [SAB Caseload Tracking].CSN, [SAB Caseload Tracking].[Case Name],
[SAB Caseload Tracking].[ASSIGNMENT TYPES], [SAB Caseload Tracking].[CF
Date], [SAB Caseload Tracking].[PAL Date], [SAB Caseload Tracking].[Current
Location], [SAB Caseload Tracking].Team, [CF Date]+180 AS [180 Mark], [SAB
Caseload Tracking].Comments
FROM [SAB Caseload Tracking]
WHERE ((([SAB Caseload Tracking].[PAL Date]) Is Null) AND (([CF Date]+180)
Between [Start date:] And [End date:]));


:

Please copy and post the SQL of your query.

(Possibly unneeded instructions follow)
Open the query
Select View:Sql from the Menu
Select all the text
Copy it
Paste it into the message

Field: [Date] DCount: [Date] + 180
criteria: Between [Start date:] And [End date:]

Is this what you needed to see?

:

Can you post your SQL?

--
Good Luck
BS"D


:

I have a calculated field that is adding 180 days to my date. I want
the
query to return only certain dates. I used the Between [Start] And
[End]
criteria under my calculated field but it is returning items with dates
between the start and end of the original date, not of the caclulated
field.
How do I get the query to return dates after it has added the 180 days?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top