DATEConverts a string representing a date to a number of seconds.
Description:
The date, encoded in a string in the form "DD MMM YYYY" or "DD MONTH YYYY", is converted to the number of seconds since the start of the Julian Period in 4713 BC.
If DATE is used as the argument for SET TIMEDATE, then the clock will be set to midnight of the date specified in the DATE argument. The date must be within the legal range supported by your operating system.
Actually, the Rocky Mountain BASIC time base is slightly different than the Julian Period, but can easily be converted. The following function converts a date in the form "DD MMM YYYY" to the Julian Day:
10 DEF FNJd(A$)
20 RETURN (DATE(A$) DIV 86400)-1
30 FNEND
See Also:
|