Description

Converts a date string into its internal system format.

Syntax

internal = IConv(string"D [year] [char] [E] [F] [G] [H] [I] [J] [month_format]")

Parameters

IConv (D) accepts arguments for the following parameters.

ParameterDescription
stringMust contain a date in a compatible format (refer to "E,F,G,H,I,J" below).

If string is not in the correct format for the conversion, a null is returned.

For a given conversion, you can enter values in a number of different ways. The day, month and year can be separated by almost nay non-numeric character. For example, the conversion"DE", string can be any of the following values:

01 MAR 200901 Mar 20091 3 09
01 March 200901/Mar/200901 03 2009
01/03/091. MARCH 200901 Mar 09
1,3,091.3.09March 1, 2009

You can enter the month as a number, an abbreviation or fully spelled out. If you spell out or abbreviate the month, you must use the exact spelling (including punctuation, if nay) in the active language set.

If you do not specify a year, the year from the system clock is used. In addition, if you only specify two digits for the year:

30 to 99 are converted as 1930 to 1999 00 to 29 are converted as 2000 to 2029

DIndicates a date conversion.
year and charThe year and char options have no effect on the IConv function. These are OConv options that are allowed in the IConv function so that you can use the same specifications for both input and output conversions.
E,F,G,H,I,J

Options that determine the order in which the system interprets the date (day, month and year).

FormatOption
01 MAR 2009DE
MAR 2009 01DF
2009 01 MARDG
MAR 01 2009DH
01 2009 MARDI
2009 MAR 01DJ

If you enter the date in numbers, make sure you enter the date and month in the correct order for the option. For option "DE," 6/1/09 converts to 15128, while 1/6/09 converts to 14982.

If you do not specify an option, and if you enter dates as numbers, option H is assumed.

month_formatThis Parameter has no effect on the IConv function. This is an OConv option that is allowed in the IConv function so you can use the same specifications for input and output conversions.

Remarks

Internally , OpenInsight stores all dates as the number of days since December 31, 1967, which is stored as day 0 (zero).

Any date "after" December 31, 1967, is saved as a positive number, the number of days that have elapsed since that date. Any date "before" December 31, 1967, is saved as a negative number, the number of days prior to that date.

See Also

Date()OConv(D)TimeDate()

  • No labels