Specifications
CHAPTER 24 DataWindow Expression and InfoMaker Functions
Users Guide 673
An expression has a more limited set of datatypes than the functions that can
be part of the expression. Although the
Date function returns a date value, the
whole expression is promoted to a DateTime value. Therefore, if your
expression consists of a single
Date function, it will appear that Date returns the
wrong datatype. To display the date without the time, choose an appropriate
display format. (See “Using DataWindow expression and InfoMaker
functions” on page 629.)
Examples These expressions all return the date datatype for July 4, 2004 when the default
location of the month in Regional Settings is center:
Date("2004/07/04")
Date("2004 July 4")
Date("July 4, 2004")
See also
IsDate
DateTime
Description Combines a date and a time value into a DateTime value.
Syntax DateTime ( date {, time } )
Return value
DateTime. Returns a DateTime value based on the values in date and
optionally time. If time is omitted,
DateTime uses 00:00:00.000000 (midnight).
Usage To display microseconds in a time, the display format for the field must include
microseconds.
For information on valid dates, see
Date.
Examples This expression returns the values in the order_date and order_time columns as
a DateTime value that can be used to update the database:
DateTime(Order_Date, Order_Time)
Argument Description
date A valid date (such as Jan 1, 2005, or 12-31-99) or a blob variable
whose first value is a date that you want included in the value
returned by
DateTime.
time
(optional)
A valid time (such as 8am or 10:25:23:456799) or a blob variable
whose first value is a time that you want included in the value
returned by
DateTime. If you include a time, only the hour portion
is required. If you omit the minutes, seconds, or microseconds, they
are assumed to be zeros. If you omit am or pm, the hour is
determined according to the 24-hour clock.