Print Page as PDF
Classic FileMan API: Date/Time Input & Conversion ICR (10003)

Classic FileMan API: Date/Time Input & Conversion    ICR (10003)

Name Value
NUMBER 10003
IA # 10003
DATE CREATED 1998/11/13
CUSTODIAL PACKAGE VA FILEMAN
CUSTODIAL ISC San Francisco
USAGE Supported
TYPE Routine
DBIC APPROVAL STATUS APPROVED
ROUTINE %DT
NAME Classic FileMan API: Date/Time Input & Conversion
ORIGINAL NUMBER 10003
GENERAL DESCRIPTION
Validate date/time input and convert it to VA FileMan's
conventional internal format:"YYYMMDD.HHMMSS", where: YYY = number of years
since 1700 MM = Month number DD = Day number HH = Hour number MM = Minute
number SS = Seconds number

STATUS Active
KEYWORDS
  • DATE
  • TIME
  • %DT
ID %DT
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION VARIABLES
%DT
Accepts input and validates the input as being the
correct date and time.
VARIABLES TYPE VARIABLES DESCRIPTION
%DT Input
A string of alphabetic characters which alter how %DT
responds. Briefly stated, the acceptable characters are:

A Ask for date input.
E Echo the answer.
F Future dates are assumed.
I Internalization, assumes the day precedes the month in input.
M Only Month and year input is allowed.
N Pure Numeric input is not allowed.
P Past dates are assumed.
R Requires time input.
S  Seconds should be returned.
T Time input is allowed but not required.
X  EXact date (with month and day) is required.

X Both
X is always returned. It contains either what was
passed to %DT (in the case where %DT did not contain an A) or what the user
entered.
%DT("A") Input
(Optional) A prompt which will be displayed prior to
the reading of the input. Without this variable, the prompt "DATE:" will be
issued.
%DT("B") Input
The default answer to the "DATE:" prompt. It is your
responsibility to ensure that %DT("B") contains a valid date/time.
%DT(0) Input
(Optional) Prevents the input date value from being
accepted if it is chronologically before, or after, a particular date.
Y Output
%DT always returns the variable Y, which can be one
of two values:

Y=-1 The date/time was invalid.  Y=YYYMMDD.HHMMSS The value determined by %DT.
DTOUT Output
This is only defined if %DT has timed-out waiting for
input from the user.
DD
Converts a FileMan internal date to external.
VARIABLES TYPE VARIABLES DESCRIPTION
Y Both
(Required) This contains the internal date to be
converted. If this has five or six decimal places, seconds will automatically
be returned.

Y is returned as the external form of the date.
%DT Input
(Optional) This is only used to force seconds to be
returned even if Y does not have that resolution. %DT must contain S for this
to happen.
DATE ACTIVATED 2015/09/29