The WordStar Resource Site Home Page  
WordStar for Windows Home Page
     
  Home    WS Emulator    WS DOS     WSWin   WS Forums   WS File Conversion    Buy WS    WS History 

 

WordStar for Windows 2.0


WordStar for Windows 2.0 Y2K Correction to Insert Date as Text Error

Introduction

WordStar for Windows 2.0 is not Y2K compliant and will incorrectly display dates in the 21st century as being in the 20th. Additionally, it will omit the leading zero of dates displayed using just two digits until 2010.

Description of Y2K Problems

  1. When using the Insert | System Variables | Date... mail merge variable the year part of the date will be inserted (invisibly) as 19xx instead of the correct 20xx.

  2. When using the Insert | System Variables | Date... as Text function the year part of the date will be inserted as:

    1. 19xx if the sytem date format is set for four-digit year numbers for the date format selected for insertion (long or short date format).

    2. _x in 'short date format' (where _ is a space) if the sytem date format is set for two-digit year numbers and the year is between 2000 and 2010.

    3. x in 'long date format' if the sytem date format is set for two-digit year numbers and the year is between 2000 and 2010, i.e., the leading zero from the year number will be missing.

Solution

These errors can be corrected for systems set to use four-digit year numbers by applying a patch to the wswin.dll file, see Q1028.

For systems set to use two-digit year numbers that will be inserted as text only (not used as mailmerge variables) a further solution is to use a macro program to correct the inserted date text.

A Macro Program to Correct Insert Date as Text Y2K Error can be downloaded using the link below:

date14.zip - Zip file (10Kb)

Macro Program Details

This program overcomes the date insertion problems by inserting the date as fixed text using the formatting set in the Windows Control Panel's Regional Settings. The program cannot insert or correct for the WordStar for Windows 2.0 problem of date merge variables which suffer the same Y2K problems outlined above.

The program gives several options:

  1. Insert date immediately in short format

  2. Insert date immediately in long format

  3. Ask user which format to use

    In options 1 and 2 the formatting for the date is taken
    from the Windows Control Panel Regional Settings.

Additional Program features

The program also allows the date to be corrected for system dates that haven't 'rolled over' correctly. This is done by checking for year values of less than 80 and assuming that these should be 20xx. Year values of 80 or greater are assumed to be 19xx. This rollover threshold can be changed if desired.

It also allows day names in date format, on-line overriding of system date formats, and auto-insertion of ordinal (legal) day number suffixes, st, nd, rd, and th.

Ordinal dates can be set as the default long date format. Ordinal dates are only available for day numbers displayed as 1-31. If a date format of 01-31 is chosen the ordinal date suffix is automatically surpressed.

The system date format override option allows run-time entry of a date format picture (e.g., "d, MMM, yyyy"). The program also allows a default 'third' date format to be preset should you normally use one format in addition to the system long and short date formats set in the Windows Control Panel International Settings dialog.

For a screen shot and full explanation of the date insertion dialog see Q1033

Installing the Y2K Insert Date as Text Program V1.4

  1. Download the zipped macro file using the link above. If you're using Netscape 4 it will try to open the file as text, so right-click the link and select Save Link As...

  2. Once you've saved the file to your hard disk, make a backup of it copy it in case you ever need to reinstal wordStar for Windows.

  3. Unzip the downloaded file - the Zip archive contains two files:

    1. date.wmc - the actual program

    2. date14.txt - instructions and information, see Q1034

  4. Read the date14.txt file for full details about the macro program.

  5. Copy the date.wmc file into your WordStar for Windows macros directory (usually called C:\WSWIN\MACROS)

  6. When you want to insert a date as text, run the Macro from the Marco | Run Macro... menu - or create a toolbutton or shortcut command to run it, see Q1035 and Q1036

TOP



Copyright © 1999-2004 Michael Petrie, United Kingdom.


 

FAQ: Q1029

 
See also:
Q1027: WordStar for Windows 2.0 Y2K Corrected Template Macro (template.wmc)
Q1028: WordStar for Windows 2.0 Y2K patch for WSWIN.DLL
Q1033: Y2K Advanced Insert Date as Text Program Description and Screen Shot
Q1034: Y2K Advanced Insert Date as Text Program V1.4 Release Notes
Q1035: Assign a Macro to a Toolbutton
Q1036: Assign a Macro to a Keyboard Command
Q1038: Alternative Y2K Insert Date as Text Program

Download Y2K Date Insertion Program (10Kb)
Download Alternative Y2K Date Insertion Program option (2Kb)

Do you use the WordStar keystroke
set in WordStar for Windows?

Do you have to use Microsoft Word 97 or later?

If the answer to both these questions is YES you NEED the WordStar Command Emulator for Word

Only $34.99

BUY IT NOW!

Buy the WordStar Command Emulator Now!