Verified Software Products Company
792 Phillips Road || Arroyo Grande, CA 93420-5019 || Phone: (805) 489-5309
Email: bkandler@verisof.com
SERVICES FREEBIES TIPS and TRICKS ARTICLES LINKS HOME
Our Products

Classes
BMPBMP
CryptoCrypto
CSVStringsCSVStrings
DataLoggerDataLogger
DatesDates
DebugRecorderDebugRecorder
FileNameSetFileNameSet
FileSenderFileSender
RDOConnectMasterRDOConnectMaster
ReportAidsReportAids
ShellerSheller
StringSetStringSet
WEBUtilitiesWEBUtilities

Modules
DAOLibDAOLib
GlobalsGlobals
RegistryRegistry

Programs
BatcherBatcher
HTMLGenHTMLGen
KillTimeKillTime
TimedMessageTimedMessage
Dates: This class takes some of the worry out of handling dates. It establishes three date formats:

  1. the one your system is set to
  2. a standard format that looks like mm/dd/yyyy
  3. a Y2K format that looks like yyyymmdd.

Then it provides the functions to easily move between the formats.

AdvanceDate provides a method for incrementing a date by any multiple of seconds, minutes, hours, days, weeks, months, or years.

FormatInputDate provides a short-hand way of inputting dates by taking advantage of the current calendar information. Inputs like dd, mm/dd, mm/dd/yy, and mm/dd/yyyy are all properly interpreted.

This class arose out of a need to simplify and make date conversions consistent across all applications. To see the full interface definition of Dates, scroll down.
Download me at once!

Dates is a small set of date conversion funtions that make life with the Date type a little easier. The AdvanceDate function is particularly useful for manipulating periodic events. Below is the interface defintion for the Class.

Sub AdvanceDate(InDate As Date, IntvlType As String, Intvl As Integer) 
' Advance entry time
' Intvl Types are: Y -year, M -month, W -week, D -day, H -hour, 
'   I -minute, S -second
' InDate is modified by adding Interval periods of IntvlType to itself.
Function CreateDateTime(ADate As String, ATime As String) As Date 
' Creates date/time stamp
Function Date2KToDate(dt) As Date              
' Format yyyymmdd as Date
Function Date2KToStdDate(dt) As String         
' Format yyyymmdd as mm/dd/yyyy
Function DateTo2KDate(dt As Date) As String    
' Format date as yyyymmdd
Function DateToStdDate(dt As Date) As String   
' Format date as mm/dd/yyyy
Function FormatDateTime2K(A As Date) As String 
' Format date as yyyymmddhhmmss
Function FormInputDate(Inp As String) As String 
' Accepts/formats short-hand date inputs
' Short-hand date entries are turned into mm/dd/yyyy
' Formats are d, dd, mdd, mmdd, mmddyyyy, mm/dd/yyyy
' Current month and/or year default when not provided in input string
Function StdDateTo2KDate(dt As String) As String 'mm/dd/yyy ==> yyyymmdd
Function StdDateToDate(dt As String) As Date     'mm/dd/yyy ==> Date

This site designed by William D. Kandler (bkandler@verisof.com)
Updated: 6/29/01