#### DTSTo2000

##### DTSTo2000(DateString, Number)

- 2 digit years(xx)
  If the Year value is greater than the windowing number, 19 is appended before the 2 digits(19xx). If the Year value is less than or equal to the windowing number, 20 is appended (20xx).
- 4 digit years(19xx)
  If the last two digits in the Year value are greater than the windowing number, the Year is retained as found in the Date field (19xx). If the two digits in the Year value are less than or equal to the windowing number, the first two digits are changed to 20 (20xx). If the first two digits in the year field are 20, the Year is retained as found in the Date field (20xx).

  Note: If the year is less than or equal to 1899 and greater than or equal to 100, there will be no change to the date.

Parameters

- Date String - Accepts only valid Date fields, with either 2 digit or 4 digit years. A DateTime string entered in the format: "yyyy/MM/dd HH: mm: ss.00" or "yy/MM/dd HH:mm:ss:00". For example, "1997/04/11 12:12:12.00" or "97/04/11 12:12:12.00".
- Number - A number between 0 and 99 corresponding with the desired windowing year.

Return value

A DateTime string with a four digit year.

Examples

- `DTSTo2000("1988-12-12 12:12:12", 90)`- Returns 2088-12-12 12:12:12 because the window value is greater than the year, and so the year will be changed to 20XX.
- `DTSTo2000("1988-12-12 12:12:12", 85)`- Returns 1988-12-12 12:12:12 because the window value is less than the year, and so the year will not change.
- These are examples of a date that will not be affected by the function:
  - `DTSTo2000("1899/12/12 1:2:3am", 99)`- Returns 1899/12/12 1:2:3am.
  - `DTSTo2000("100/12/12 1:02:03AM", 99)`- Returns 100/12/12 1:02:03AM.
- Some databases maintain the year of a date as a two-digit field and so these samples will simulate that date field:
  - `DTSTo2000("98/12/12 1:02:03AM", 99)`- Returns 2098/12/12 1:02:03AM.
  - `DTSTo2000("98/12/12 1:02:03", 97)`- Returns 1998/12/12 1:02:03AM.
  - `DTSTo2000("9/12/12 1:02:03AM", 10)`- Returns 2009/12/12 1:02:03AM.
  - `DTSTo2000("1/12/12 1:02:03AM", 0)`- Returns 1901/12/12 1:02:03AM.