>We are using MS SQL Server as a backend. The table in the database stores person's birth date. During the retrieval I would like to calculate age for the person. I use ODBC's TIMESTAMPDIFF which is listed in datetime function in view designer. The field definition looks like this:
>{fn TIMESTAMPDIFF(SQL_TSI_YEAR,{fn CURDATE()},birthday)} as age
>
> When I click button to verify it I get VFP's syntax error. And this heppens to any expression which has one ODBC function inside another one. Does anybody knows work around it?
>
>TIA
>Dmitriy
Hi Dmitriy,
Replace CURDATE() with SQL Server's GETDATE() function to get the
current date.
Bye
- Jayesh