Home  Search  Products  Buy Now  Contact Us  About 2GS  Coder's Corner 
Home
Search
Products
Buy Now
Product User Guides
    myOwn10-Key
    myOwnPayday
    Trend Importer
    Double Text
Contact Us
About 2GS
Coder's Corner
    Double Text History


Email links not working?
Click here to find out why.

Links

eShopping-Directory


Free Downloads

Idaho at OyMap.net
A world directory

Coder's Corner
VB 6 Date Wizard

George B Gilbert

Introduction

The Date Wizard class provides a full range of frequently needed date tests, functions and formatting. By adding this date class to any compatible project in which dates are used, tested and/or manipulated, you save both time and money because coding of frequently used and tricky date routines is already done. Your date functions are ready to go without any coding, debugging, testing or documentation resources being expended. In addition, with the date wizard class you are assured that date routines will work and are being consistently applied across projects.

Download

  • Download class module - 19 Kb

Description

Think of the Date Wizard as a "meat grinder" for dates. Using one of five date setting methods, the using program only has to set one base date. After the base date has been set, the abundant properties make that base date available in just about any format you can imagine.

  • Sort format (e.g. 19990831)
  • Short formats (e.g. 08/31/1999; 8/31/1999)
  • Long formats (e.g. August 31, 1999; August, 1999)
  • Julian Day and Date formats (e.g. 13, 1999245)
  • The base date’s weekday expressed as an ordinal (e.g. 2nd, 7th)
  • The base date’s day of the month expressed as an ordinal (e.g. 1st, 3rd, 15th, 21st)
  • The full and abbreviated name of the base date’s weekday

Other dates and information which are related to the base date also become available.

  • Full and abbreviated name of the month containing the base date.
  • Year containing the base date as both string and integer.
  • Whether the year containing the base date is a leap year (takes into account those even centuries which are leap years).
  • The first and last days and weekdays in the week containing the base date.
  • The first and last days and weekdays in the month containing the base date.
  • The first and last days and weekdays in the fiscal quarter containing the base date.
  • The first and last weekdays in each of the four fiscal quarters in the year containing the base date.
  • The number of the month containing the base date expressed as an ordinal (e.g. 2nd, 12th)
  • The number of the fiscal quarter containing the base date expressed as and ordinal (1st, 2nd, 3rd, 4th)
  • Occurrence of the base date within the base month (e.g. the 2nd Wednesday in a month would return a 2)

Other very helpful date functions include:

  • Setting the character used in date formats at both design-time and run-time (e.g. 1/1/99; 1-1-99; 1.1.99). Any available character is permitted.
  • Determining if a date is within a date range. The first and last dates in the date range do not have to be dates thus allowing open-ended date ranges.
  • Determining whether one date range overlaps another date range. The first and last dates in either date range do not have to be dates thus allowing open-ended date ranges.
  • Making all month and weekday names available for such purposes as loading combo and list boxes.
"I really have found from personal experience that your programs always hit the right spot. They are useful tools that do what they say they will do."
K. Millward
Great Britain

Home  |  Search  |  Products  |  Buy Now  |  Contact Us  |  About 2GS  |  Coder's Corner

Send comments on this site to Webmaster