Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I am in need of a Formula for Datediff - missing ) string 1

Status
Not open for further replies.

nathanwiley

Technical User
Oct 9, 2009
27
US
I am a newbie still, but I am stuck once again on a formula...

I am wanting to take a table {vwAVMembersAll.DOB} and get the age of our families.

I have started this formula but get an error of missing ) string.

dateDiff("yyyy",(Date(CurrentDate){vwAVMembersAll.DOB}


Thank you for your time and help.

Nathan
 

[tt]
dateDiff("yyyy",(Date(CurrentDate)[red],[/red]{vwAVMembersAll.DOB}[red])[/red]
[/tt]


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
ok i have a revised formula...

{vwAVEAPApplications.ProgramYear} = 2010 and
{vwAVApplications.ApprovedForEAP} and
DateDiff(“yyyy”, {vwAVMembersAll.DOB}, CurrentDate)

still get missing ) string...

Thanks again for any help
Nathan
 
Skip,

I tried this

dateDiff("yyyy",(Date(CurrentDate)

, <----

{vwAVMembersAll.DOB})

and where its bolded says missing ) string
 


why don't you post the entire expression, rather than your version of what's important.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Sorry, here is what I want to do...

We work with a seasonal program and now we are approaching summer, and our new program only allows us to help specific groups, Elderly, disabled, and families with children under 6.

So the table I have is {vwAVMembersAll.DOB}

I don't have any other variables to add other than I need it to show the number of years the family member is.

So if the family DOB is 6/20/1976 the report would place a number of 34.

I hope this is what you meant.
 



No, it is not.

The entire expression, please.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Only thing I could find, I do access crystal though a state server so some options may be grayed out...

SELECT "vwAVEAPApplications"."ProgramYear", "vwAVMembersAll"."LastName", "vwAVMembersAll"."FirstName", "vwAVMembersAll"."IsHOH", "vwAVEAPApplications"."ApplicationKey", "vwAVMembersAll"."SSN", "vwAVMembersAll"."Disabled", "vwAVApplications"."AreaCode", "vwAVApplications"."PhoneNmbr", "vwAVApplications"."HouseNmbr", "vwAVApplications"."Address1", "vwAVApplications"."City", "vwAVApplications"."ApplicationKey", "vwAVApplications"."ApprovedForEAP", "vwAVApplications"."CountyName", "vwAVMembersAll"."DOB"
FROM ("HCSWAP"."dbo"."vwAVEAPApplications" "vwAVEAPApplications" INNER JOIN "HCSWAP"."dbo"."vwAVMembersAll" "vwAVMembersAll" ON "vwAVEAPApplications"."ApplicationKey"="vwAVMembersAll"."ApplicationKey") INNER JOIN "HCSWAP"."dbo"."vwAVApplications" "vwAVApplications" ON "vwAVMembersAll"."ApplicationKey"="vwAVApplications"."ApplicationKey"
WHERE "vwAVEAPApplications"."ProgramYear"=2010 AND "vwAVApplications"."ApprovedForEAP"=1
ORDER BY "vwAVApplications"."CountyName", "vwAVEAPApplications"."ApplicationKey", "vwAVMembersAll"."Disabled"

Is this what you ment.
 



Where are you using the DateDiff function in the SQL that you posted???

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Ok, I told you I was a noobie, but I didn't place the forumla provided in the correct place.

I relized my mistake and then added under the formula field a new formula named (age)...

thus - DateDiff("yyyy", {vwAVMembersAll.DOB}, CurrentDate) worked perfect. Thank you sooo much

again sorry for my newness...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top