Your problem is that the field is probably datetime data type and the code for that would be;
* Convert the Datetime value to a date value
ldDate = DATE(YEAR(MyTable.MyField),MONTH(MyTable.MyField),DAY(MyTable.MyField))
lnDayNumber = ldDate - Date( YEAR(ltDate), 1, 1) + 1
>error"Funcation arguments value or type or count is invalid" > >But when i write ldDate = date() no problem. >I am using vfp9 sp1. >thanks