Today PowerScript function
Description
Obtains the system date and, in some cases, the system time.
Syntax
|
1 |
<span>Today</span> ( ) |
Return Values
Date. Returns the current system date.
Usage
Although the datatype of the Today function
is date, it can also return the current time. This occurs when Today is
used as an argument for another function and that argument allows
different datatypes.
For example, if you call Today as an argument
to the String function, String returns
both the date and time when you use a date-plus-time display format.
A second example: if you call Today as an argument
for the SetItem function and the datatype of
the target column is DateTime, both the date and time are assigned
to the DataWindow.
Examples
This statement returns the current system date:
|
1 |
<span>Today</span>() |
This statement executes some statements when the
current system date is before April 15, 2003:
|
1 |
IF <span>Today</span>() < 2003-04-15 THEN ... |
This statement displays the current date in the StaticText st_date in
the corner of a window:
|
1 |
st_date.Text = String(<span>Today</span>(), "m/d/yy") |
This statement displays the current date and time
in the StaticText st_date:
|
1 |
st_date.Text = String(<span>Today</span>(), "m/d/yy hh:mm") |
See Also
-
Today method for DataWindows
in the DataWindow Reference or online Help