First of all, welcome to OSIsoft vCampus!
I have reformatted your post, because it was completely unreadable. Also, not all of our members (including me) speak Spanish, so please use English only here.
Google translate of the Spanish part:
"I send you and I have it ... the following function obtains attribute values, if the attribute refers to a PIPoint, returns null:"
Back to the issue at hand:
What are you really trying to accomplish here? From what I can read, you want to return the value for the attribute with name attName at sDate? It seems really wrong to use AFAttribute.FindElementAttributes for this. Also. please have a look at DateTime.Parse...
Why not use node.Attributes[attName].GetValue(DateTime.Parse(sDate)?
There are two possibilities here. One is that your call to FindElementAttributes is not returning any attributes. Your arguments seem correct, but accessing via the Attributes collection would be easier on the eyes. The other is that the AFValue returned by GetValue has IsGood == false. Typically if an exception is thrown by GetValue, AF wraps the exception in an AFValue object with IsGood set to false and the Value property set to the exception object. You should design for this case and log and/or propagate the error. An exception could be thrown for any number of reasons including not having security rights to access via AF (not having ReadData permission) or not being able to communicate with the PI Server. Also tags in a System digital state (e.g. Pt Created) will return IsGood as false as well.