Class Module
73 Members
★ 1 Top 20
Dates Times Class
Entisoft Tools 2.0 Object Library · DatesTimes · 62 Functions · 0 Properties · 10 Subroutines
Declarations
Declarations
Numerical functions related to dates and/or times. Copyright 1998 Entisoft
Section
AddBusinessDays
Add Business Days
Add a number of business days to a date or subtract a number of business days from a date.
Function
AddMonths
Add Months
Add a number of months to the given date.
Function
AgeDifference
Age Difference
Return the difference in years between the two dates. vCountTime determines whether Time is considered within the calculation.
★ Top 20
Function
Calendar
Calendar
Produce a calendar for a month that resembles the output of the UNIX cal command.
Function
DateTimeSortedString
Date Time Sorted String
"Date And Time To Sorted String" Convert a date/time value into a numeric string which can be used to sort the date into chronological order. Components of the date and time are ordered from the most significant (the year) to the least significant (the second).
Function
DateTimeTo8CharString
Date Time To 8 Char String
"Date And Time To Eight Character String" Converts date/time value into an eight-character string that can be used as a (DOS short) file name. The range is one decade. The resolution is one minute.
Function
DateTimeToDouble
Date Time To Double
Takes a Date/time value an converts it into the floating-point number of days since 12/30/1899 00: 00. This is different that using the CDbl function to convert a Date to a Double because of the way that Microsoft represents pre-1900 dates. Inverse of the DoubleToDateTime function.
Function
DateTimeToJulianDay
Date Time To Julian Day
Returns the Julian Day corresponding to a date/time value.
Function
DateTo3CharString
Date To 3 Char String
"Date To Three Character String" Converts the date portion of a date/time value into a three-character string. The resolution is one day. The range is one decade. This string is suitable for use as the prefix or extension for a file name.
Function
DateTo4CharString
Date To 4 Char String
"Date To Four Character String" Converts the date portion of a date/time value into a four-character string. The resolution is one day. The range is one decade. This string is suitable for use as the prefix for a file name.
Function
DateToZodiac
Date To Zodiac
"Date To Zodiac Name" Returns the name of the Zodiac sign given a date.
Function
DayNumber
Day Number
Return the number of days since 1/1/1 plus one.
Function
DayOfYear
Day Of Year
Return the day of the year for a given date. The days are numbered consecutively starting with the first day of the year.
Function
DaysInMonth
Days In Month
Return the number of the last day of the month for a given date. Same as returning the last day of the month.
Function
DaysInYear
Days In Year
Return the number of days in the year.
Function
DaysSinceZero
Days Since Zero
Return the number of days since 00/00/0000.
Function
DecimalToHMS
Decimal To HMS
"Decimal Degrees To Hours Minutes Seconds" Convert a decimal number of hours into number representing Hours, Minutes, and Seconds. Converts 12.5824388 hours into 12.345678 (representing 12h 34m 56.78s).
Function
DoubleToDateTime
Double To Date Time
Converts the floating-point number of days since 12/30/1899 00: 00 into a Date/time value. This is different that using the CDate function to convert a Double to a Date because of the way that Microsoft represents pre-1900 dates. Inverse of the DateTimeToDouble function.
Function
Easter
Easter
Returns the day on which the Christian religious holiday Easter occurs given the year.
Function
EndOfAddMonths
End Of Add Months
Return the last day of the month after adding a number of months to the given date.
Function
EndOfMonth
End Of Month
Returns the last day in the month given a date value.
Function
FirstBusinessDayOfMonth
First Business Day Of Month
Returns the first weekday in the month given a date value. Same as FirstWeekdayOfMonth , but accepts arguments differently.
Function
FirstDayOfMonth
First Day Of Month
Returns the first day in the month given a date value.
Function
FirstDayOfPeriod
First Day Of Period
Return the first day of the period (for example, the first day of the quarter), given a date within the period and the number of periods per year.
Function
FirstDayOfWeek
First Day Of Week
Returns the first day of the week (the first Sunday) for the given date. Returns vDate if it is already the first day of the week.
Function
FirstDayOfWeekInMonth
First Day Of Week In Month
Returns the first day of the week (for example, the first Tuesday) in the specified month.
Function
FirstWeekdayOfMonth
First Weekday Of Month
Returns the first weekday of the month, with the weekdays considered Monday through Friday. Same as FirstBusinessDayOfMonth , but accepts arguments differently.
Function
HMSToDecimal
HMS To Decimal
"Hours Minutes Seconds To Decimal Degrees" Convert number representing Hours, Minutes, and Seconds into a decimal number of hours. Converts 12.345678 (representing 12h 34m 56.78s) to 12.5824388
Function
IsLeapYear
Is Leap Year
Return true if the year is a leap year, meaning that it has 29 days in February and 366 days altogether.
Function
IsWeekday
Is Weekday
"Is Date A Weekday" Return True if a date is a weekday such as Monday, Tuesday, Wednesday, Thursday, or Friday.
Function
IsWeekendDay
Is Weekend Day
"Is Date A Weekend Day" Returns True if a date is a weekend day such as Saturday or Sunday.
Function
JulianDate
Julian Date
Return the Julian Date given a year, month, and day of month. Similar to the JulianDay function, but correctly handles pre-1752 dates.
Function
JulianDay
Julian Day
Returns the Julian Day corresponding to a date/time value. Similar to the JulianDate function, but does not correctly handle pre-1752 dates since it is based upon Microsoft's date functions.
Function
LastBusinessDayOfMonth
Last Business Day Of Month
Returns the last weekday in the month given a date value. Same as LastWeekdayOfMonth , but accepts arguments differently.
Function
LastDayOfMonth
Last Day Of Month
Returns the last day in the month given a date value.
Function
LastDayOfPeriod
Last Day Of Period
Return the last day of the period (for example, the last day of the quarter), given a date within the period and the number of periods per year.
Function
LastDayOfWeek
Last Day Of Week
Returns the last day of the week (the Saturday) for the given date. Returns vDate if it is already the last day of the week.
Function
LastDayOfWeekInMonth
Last Day Of Week In Month
Returns the last day of the week (for example, the last Tuesday) in the specified month.
Function
LastWeekdayOfMonth
Last Weekday Of Month
Returns the last weekday of the month, with the weekdays considered Monday through Friday. Same as LastBusinessDayOfMonth , but accepts arguments differently.
Function
MoonPhase
Moon Phase
Returns the phase of the moon as a number between 0 and 7. Use the MoonPhaseName function to determine the name for the moon phase.
Function
MoonPhaseName
Moon Phase Name
Returns the name of the moon phase given its number between 0 and 7. Use the MoonPhase function to determine the phase of the moon for a given date.
Function
NextDayOfWeek
Next Day Of Week
Returns the date of the next specific day of the week (for example, the next Saturday).
Function
NextDayOfWeekOnOrAfter
Next Day Of Week On Or After
Returns the date of the current or next specific day of the week (for example, the current or next Saturday). Function returns the date component of vDate if it is the same day of the week as vDayOfWeek.
Function
NextWeekday
Next Weekday
Returns the next weekday (Monday through Friday) after the specified date.
Function
NowTimer
Now Timer
Similar to the built-in Now function except accurate to 1/18 second.
Function
NowUnique
Now Unique
Return the current date and time accurate to 1/18 of the a second. Forces the Microsoft Access Query optimizer to execute this function call for each row of the SQL UPDATE statement in which it is normally used; see below.
Function
NowUniqueWithSleep
Now Unique With Sleep
Return the current date and time accurate to 1/18 of the a second, then sleep for 1 (one) second. Forces the Microsoft Access Query optimizer to execute this function call for each row of the SQL UPDATE statement in which it is normally used; see below.
Function
NthDayOfWeekInMonth
Nth Day Of Week In Month
Returns the Nth day of the week (for example, the second Tuesday) in the specified month.
Function
NumberWorkDays
Number Work Days
Determine the number of business days between two dates, taking into account holidays that fall between the two dates.
Function
ParseDateTime
Parse Date Time
Uses a date/time Format to parse the date and/or time components from a String, then returns the value as a date/time.
Function
PreviousDayOfWeek
Previous Day Of Week
Returns the date of the previous specific day of the week (for example, the previous Saturday).
Function
PreviousDayOfWeekOnOrBefore
Previous Day Of Week On Or Before
Returns the date of the current or previous specific day of the week (for example, the current or previous Saturday). Function returns the date component of vDate if it is the same day of the week as vDayOfWeek.
Function
PreviousWeekday
Previous Weekday
Returns the next weekday (Monday through Friday) after the specified date.
Function
SeasonName
Season Name
Returns the name of the season corresponding to the given date. Season differs depending upon whether location is Northern Hemisphere or Southern Hemisphere.
Function
ShipBells
Ship Bells
Returns the number of ships bells to be rung at the given time, or zero for none. Ships rings their bells at half-hour intervals. For all other times, this function returns 0 (zero).
Function
StartOfMonth
Start Of Month
Returns the first day in the month given a date value.
Function
WeekdayFmString
Weekday Fm String
"Weekday Number From Name" or "Weekday Name To Number" Convert a string naming a day of the week into a numeric constant. Return the vb numeric value corresponding to the named day of the week.
Function
WeekdayMonthAndDayToMatchingYears
Weekday Month And Day To Matching Years
Takes part of a date such as Sun. Feb 15 along with a range of years, then returns a string containing the years in which that date is valid.
Function
WeekdayToString
Weekday To String
"Weekday Number To Name" or "Weekday Name From Number" Convert a number representing a day of the week into the name of the day. Accepts one of the vb constant values which represent the days of the week.
Function
WorkDays
Work Days
Add a number of business days to a date, taking into account holidays. Similar to the AddBusinessDays function, but takes into account holidays, and slightly different when vDate is on a weekend.
Function
YearFraction
Year Fraction
Return the fractional part of the year (or years) between two dates, according to the specified day count basis.
Function
Zodiac
Zodiac
"Date To Zodiac Name" Returns the name of the Zodiac sign given a date.
Function
AddMonthsTest
Add Months Test
View VB6 signature, parameters, and usage notes.
Sub
DateToZodiacSample
Date To Zodiac Sample
View VB6 signature, parameters, and usage notes.
Sub
EndOfAddMonthsTest
End Of Add Months Test
View VB6 signature, parameters, and usage notes.
Sub
IsLeapYearTest
Is Leap Year Test
View VB6 signature, parameters, and usage notes.
Sub
LeapYearsVerify
Leap Years Verify
View VB6 signature, parameters, and usage notes.
Sub
NumberWorkDaysTest
Number Work Days Test
View VB6 signature, parameters, and usage notes.
Sub
UniqueYearsVerify
Unique Years Verify
View VB6 signature, parameters, and usage notes.
Sub
WorkDaysTest
Work Days Test
View VB6 signature, parameters, and usage notes.
Sub
YearFractionTest
Year Fraction Test
View VB6 signature, parameters, and usage notes.
Sub
ZodiacSample
Zodiac Sample
View VB6 signature, parameters, and usage notes.
Sub