[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
MAKEDATE(<C date string> [,<N months>])
Makes an invalid date string valid and adds or subtracts months.
Returns valid <expD> of <date string>, even if <date string> is invalid.
<date string> is in the format "YYYYMMDD".
<months> optionally to add or subtract.
Returns an empty <expD> if <date string> is not in the proper format.
Takes a "best guess" in cases where the valid date is not obvious.
* Date string from calculations may be invalid
m_datestr = STR( YEAR(DATE()) ) +;
STR( MONTH(DATE()) + m_months ) +;
STR( DAY(DATE()) + m_days )
* Date type is blank if date string is invalid
date_type = STOD(m_datestr)
* Date type is valid even if date string is invalid
date_type = MAKEDATE(m_datestr)
* Add 1.23 months to current date
new_date = MAKEDATE( DTOS(DATE()), 1.23 )
* Subtract 1.23 months from current date
new_date = MAKEDATE( DTOS(DATE()), -1.23 )
Placed in the Public Domain by Tom Rettig Assoc.
See Also:
CDTOS()
ISDSDATE()
NTOD()
STOD()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson