次の方法で共有


DTOS( ) Function

Returns a character-string date in a yyyymmdd format from a specified Date or DateTime expression.

DTOS(dExpression | tExpression)

Return Value

Character

Parameters

  • dExpression
    Specifies the Date expression DTOS( ) converts to an eight-digit character string.

  • tExpression
    Specifies the DateTime expression DTOS( ) converts to an eight-digit character string.

Remarks

This function is useful for indexing tables on a Date or DateTime field. It is equivalent to DTOC( ) when its optional 1 argument is included.

The character string returned by DTOS( ) isn't affected by SET DATE or SET CENTURY.

Example

CLEAR
? DTOS(DATE( ))

See Also

Reference

DATE( ) Function

DATETIME( ) Function

CTOD( ) Function

DTOC( ) Function

Other Resources

Functions

Language Reference (Visual FoxPro)