Skip to content

Movedate Command

Obsolete

This command is replaced by the Move command.

See Also

Purpose

To check data to make sure it is a valid date, and move it to a variable.

Syntax

movedate
    value
    to
    variable

What It Does

Movedate checks the value of value to ensure it is a valid date, evaluates it as a date, and moves it to variable. If the data in value is not a valid date, DataFlex Error 16 (Please enter a valid date) is triggered, but the data is still evaluated (probably incorrectly) and moved.

When a move command addresses an explicit variable of Type Date, the compiler automatically replaces the move command with a movedate command. Where you know that data is being moved to a variable of Type Date, using movedate instead of move can save a very small amount of time per command at compile time.

Notes

  • Movedate checks the eligibility of data for the Date type. If you movedate a value such as 12/42/44 or 24 December, DataFlex Error 16 (Please enter a valid date) will be triggered, regardless of the actual type of variable.

  • Movedate disables DataFlex's automatic type checking of variables. If you movedate a valid date to an Integer, Number, Real, or String type variable, no error will be declared at compile time, nor will one be declared at runtime. This effect is harmless, as long as you intend it. A String type variable will contain the date in string format, and Integer, Numeric, and Real type variables will contain the date expressed as the number of days since Year Zero (Julian format).