Movedate Command
Obsolete
This command is replaced by the Move command.
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
-
Movedatechecks the eligibility of data for the Date type. If youmovedatea value such as12/42/44or24 December, DataFlex Error 16 (Please enter a valid date) will be triggered, regardless of the actual type ofvariable. -
Movedatedisables DataFlex's automatic type checking ofvariables. If youmovedatea valid date to an Integer, Number, Real, or String typevariable, 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 typevariablewill contain the date in string format, and Integer, Numeric, and Real typevariableswill contain the date expressed as the number of days since Year Zero (Julian format).