|
|
function
|
round-down-ymdhms
|
|
Library: Date and Time
Include: omdate.xin
|
Returns: String
Returns the specified date/time rounded down to the nearest indicated interval.
|
Declaration define stream function round-down-ymdhms value stream ymdhms
to value stream interval
Purpose
This function takes a date/time in "YYYYMMDDhhmmss+ZHZM" format, and returns the same value but rounded down to the beginning of an interval indicated by the second argument.
Arguments:
- "ymdhms" -- a date/time in "YYYYMMDDhhmmss+ZHZM" format.
- "interval" -- the name of the interval which you want the indicated date rounded to. For example, "year", "month", "day", "hour", or "minute". Only the shortest distinguishing prefix of the interval name is needed, so "y" can be used in place of "year", but "mo" and "mi" are needed to distinguish between "month" and "minute". This argument can be in either uppercase or lowercase. If this argument is unrecognized, the date/time will be returned unchanged.
Example:
process
local stream now
set now to now-as-ymdhms
output "Now, rounded down to the minute = " || round-down-ymdhms now to "mi" || "%n"
Generated: April 21, 1999 at 2:01:15 pm
If you have any comments about this section of the documentation, send email to [email protected]
Copyright © OmniMark Technologies Corporation, 1988-1999.