Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


ID: 13326, Get the Number of Days for a TDateTime field to Today

by Frank Hirka Email: Anonymous


Download Details
FTP  download also available 0 bytes
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For Delphi, Version 1.0  to 4.0 19 downloads
Copyright: No significant restrictions


Size: 0 bytes
Updated on Mon, 17 May 1999 00:00:00 GMT
Originally uploaded on Mon, 17 May 1999 00:00:00 GMT
Description
This Function returns the number of days to today from a Database record.

Returns the number of days as an INTEGER to today from a date in a database record
fTableName: Tablename
fFieldName: Fieldname

Function DBDaytoNow(fTableName: TDataSet; fFieldName: string): LongInt;
var
c : Tdatetime;
begin
c := TTable(fTableName).Fieldbyname(fFieldName).asDateTime;
result := round(Date - c);
end;

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Server Response from: ETNACDC03