A Programmer's Library of Routines for Date Editing and Conversion

Download a Free Trial

Read a review

Robelle and Year 2000 FAQ

HP3000 Resources for Year 2000

The Year 2000 Conversion Solution!

Year 2000 conversions present many challenges. If you want an efficient way to meet the challenges of date conversion on your HP 3000, look to SmartDate. SmartDate provides you with an easy way to change your applications to support dates that extend well into the 21st century. SmartDate helps your programs to convert, compare, and edit dates. What's more, with SmartDate you have a proven technology, one that's already been included for years in other Robelle software products.

Just a Callable Routine Away

SmartDate is a set of routines that manipulate and calculate dates, and which are callable from such common 3GL programs as COBOL, Pascal, C, and so on. The routines provide a generalized way to get today's date, convert dates among various formats, and perform calculations such as finding the number of days between two dates.

One Routine Fixes All Your Dates

Each different program written over the years may have acquired its own way of working with dates. Now, one of the tasks in Year 2000 conversions is to alter these diverse programs so that they'll work with the new date storage formats that can hold the century. You could take the time to hard-code each program with its own date mechanism. However, a more efficient approach is to have every program call a common routine. Here's where SmartDate can help. Either your programs can call SmartDate directly, or SmartDate can form the foundation for a routine that you create. SmartDate recognizes and converts over two dozen date and storage formats. Furthermore, you don't have to learn how to calculate leap years or how to subtract two dates -- SmartDate does it for you.

Compare Without Converting

Comparing two dates to determine which is first chronologically can be complicated, but not with SmartDate. Say, for example, that your cutoff rule for interpreting a six-digit date without the century is that years 30 through 99 are in the 1900s, and years 00 through 29 are in the 2000s. When converting or comparing dates, SmartDate will remember this rule and assign the appropriate century for each year. In this way SmartDate allows you to work with existing dates in your databases, without the bother of having to convert them.

Let SmartDate Do the Work

Even if you have converted your databases and applications to work with four-digit years, users may complain about having to type four-digit years as part of their data entry or selection criteria. To avoid a user revolt, use SmartDate. SmartDate can let your applications convert human-friendly input to the format that the program or database needs. When converting user input to a program's internal format, SmartDate can also apply the century cutoff rule that you specify.

People Dates vs. Computer Dates

Often the dates stored in your databases are not in a format that users want to type or to see on their reports. SmartDate allows users to enter dates in people-friendly formats, and to see dates in a number of display formats. It even permits some free-format input to accommodate your company's in-house date style. SmartDate offers conversion from any of the date formats listed as "From", to any other date format:
    Dec 31, 2000     Format             Data Type  From/To

    311200           DDMMYY             6-byte     From/To
    31/12/00         DD/MM/YY           8-byte     From/To
    001231           YYMMDD             32-bit     From/To
    51566            Calendar           16-bit     From/To
    DEC 31, 2000     MMM DD, CCYY       12-byte    To-only
    31 DEC00         DD MMMYY           8-byte     From/To
    123100           MMDDYY             6-byte     From/To
    12/31/00         MM/DD/YY           8-byte     From/To
    001231           YYMMDD             6-byte     From/To
    0012             YYMM               16-bit     From/To
    1200             MMYY               4-byte     From/To
    DEC 00           MMM YY             6-byte     To-only
    00/12/31         YY/MM/DD           8-byte     From/To
    20001231         CCYYMMDD           8-byte     From/To
    20001231         CCYYMMDD           32-bit     From/To
    WED, DEC 31, 20  DDD, MMM DD, CCYY  18-byte    To-only
    A01231           AAMMDD             6-byte     From/To
    31122000         DDMM[CC]YY         n-byte     From/To
    12312000         MMDD[CC]YY         n-byte     From/To
    20001231         [CC]YYMMDD         n-byte     From/To
    Dec31 00         MMMDD YY           8-byte     From/To
    2001231          YYYMMDD            32-bit     To-only
    200012           CCYYMM             6-byte     From/To
    200012           CCYYMM             32-bit     From/To
    2000             CCYY               4-byte     From/To
    2000             CCYY               32-bit     From/To
    51615            Powerhouse         16-bit     From/To

Edit As You Convert

As dates are converted you can apply a number of editing functions to them:
  • Calculate the number of days between two dates
  • Return the day of the week for a given date
  • Is a given date within a certain number of days before or after the current date?
  • Is a given date within 20 days before to 60 days after the current date?
  • Is a given date less than or equal to the current date?
  • Is a given date equal to or greater than the current date?
  • Add a number of days forward or backward to a given date
  • Allow zero as a valid date when converting
  • Return the last day of the month for a given date
  • Apply a century cutoff rule to a date with a two-digit year

Reliability and Flexibility - That's SmartDate

SmartDate has been used in software products such as Qedit, Suprtool, and Xpress for many years. It is because of SmartDate that Robelle products have already been Year 2000 compliant for a long time. In addition, SmartDate works with dates from 1583 to 2583, offering enough flexibility for virtually all applications.