LUPDATE( ) Function

Example   See Also

Returns the date on which a table was last updated.

Syntax

LUPDATE([nWorkArea | cTableAlias])

Returns

Date

Arguments

nWorkArea | cTableAlias

Returns the last update to a table open in another work area. nWorkArea specifies the work area number and cTableAlias specifies the table alias. LUPDATE( ) returns the date of the last update to the table in the currently selected work area if you omit nWorkArea and cTableAlias.

If no table is open in the work area you specify, LUPDATE( ) returns a blank date. If no table has the alias you specify, Visual FoxPro generates an error message.

Remarks

This function is useful in update procedures.

Note that in earlier versions of Visual FoxPro, the last two digits of the year a table was last updated is stored the table header. Because only the last two digits are stored, you cannot determine the century in which the table was updated, it always defaults to the 19th century.

In Visual FoxPro 6.0, LUPDATE( ) queries Windows to determine the date a table was last updated, allowing you to determine the century in which the table was updated. However, the last two digits of the year the table was last updated is still stored the table header.